import { jsx, jsxs } from 'react/jsx-runtime';
import { pick } from '../characterTypes.js';

const HeadwearNone = () => null;
const HeadwearCap = ({ colors, scale = 1, transform }) => {
    const base = pick(colors, 0, "var(--anim-stroke, #111)");
    return (jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} scale(${scale})`, children: jsx("path", { d: "M-30 -14 q0 -18 30 -22 q30 4 30 22 h6 v6 h-72 v-6 z", fill: base }) }));
};
const HeadwearCrown = ({ colors, scale = 1, transform }) => {
    const base = pick(colors, 0, "#FFD700");
    return (jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} scale(${scale})`, children: jsx("path", { d: "M-22 -30 l6 -16 l8 10 l8 -14 l8 14 l8 -10 l6 16 z", fill: base, stroke: "#B8860B", strokeWidth: 1.2 }) }));
};
const HeadwearHeadphones = ({ colors, scale = 1, transform }) => {
    const base = pick(colors, 0, "#333");
    return (jsxs("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} scale(${scale})`, stroke: base, strokeWidth: 2.5, fill: "none", children: [jsx("path", { d: "M-30 0 q0 -40 30 -42 q30 2 30 42" }), jsx("rect", { x: -36, y: -6, width: 10, height: 16, rx: 3, fill: base }), jsx("rect", { x: 26, y: -6, width: 10, height: 16, rx: 3, fill: base })] }));
};
const HeadwearBeanie = ({ colors, scale = 1, transform }) => {
    const base = pick(colors, 0, "#E53E3E");
    return (jsxs("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} scale(${scale})`, children: [jsx("path", { d: "M-28 -14 q0 -22 28 -26 q28 4 28 26 z", fill: base }), jsx("circle", { cx: 0, cy: -42, r: 6, fill: base })] }));
};
const HEADWEAR_RENDERERS = {
    none: HeadwearNone, cap: HeadwearCap, headphones: HeadwearHeadphones,
    hat: HeadwearCap, crown: HeadwearCrown, beanie: HeadwearBeanie,
    bandana: HeadwearCap, visor: HeadwearCap, bow: HeadwearNone,
    tiara: HeadwearCrown, fedora: HeadwearCap, beret: HeadwearBeanie,
    headband: HeadwearNone, helmet: HeadwearCap, headsetMic: HeadwearHeadphones,
    hood: HeadwearBeanie, cowboy: HeadwearCap, bunnyEars: HeadwearNone,
};
const Headwear = ({ variant, ...rest }) => {
    var _a;
    const Comp = (_a = HEADWEAR_RENDERERS[variant]) !== null && _a !== void 0 ? _a : HeadwearNone;
    return jsx(Comp, { ...rest });
};

export { HEADWEAR_RENDERERS, Headwear, HeadwearBeanie, HeadwearCap, HeadwearCrown, HeadwearHeadphones, HeadwearNone };
//# sourceMappingURL=headwear.js.map
