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

function pal(c) {
    return {
        lip: pick(c, 0, "var(--anim-lip, #E11D48)"),
        inner: pick(c, 1, "var(--anim-inner, #FEE2E2)"),
        stroke: pick(c, 2, "var(--anim-stroke, #111)"),
    };
}
const MouthSmile = ({ colors, y = 8, scale = 1, transform, strokeWidth = 1.6 }) => {
    const c = pal(colors);
    return (jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, strokeLinecap: "round", children: jsx("path", { d: "M-10 0 q10 12 20 0", fill: c.lip }) }));
};
const MouthFrown = ({ colors, y = 8, scale = 1, transform, strokeWidth = 1.6 }) => {
    const c = pal(colors);
    return (jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, strokeLinecap: "round", children: jsx("path", { d: "M-10 4 q10 -12 20 0", fill: c.lip }) }));
};
const MouthOpen = ({ colors, y = 8, scale = 1, transform, strokeWidth = 1.4 }) => {
    const c = pal(colors);
    return (jsxs("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, children: [jsx("ellipse", { cx: 0, cy: 2, rx: 8, ry: 6, fill: c.inner }), jsx("path", { d: "M-8 2 q8 -6 16 0", fill: c.lip })] }));
};
const MouthFlat = ({ colors, y = 8, scale = 1, transform, strokeWidth = 1.6 }) => {
    const c = pal(colors);
    return (jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, strokeLinecap: "round", children: jsx("line", { x1: -8, y1: 2, x2: 8, y2: 2 }) }));
};
const MouthGrin = ({ colors, y = 8, scale = 1, transform, strokeWidth = 1.4 }) => {
    const c = pal(colors);
    return (jsxs("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, children: [jsx("path", { d: "M-12 0 q12 16 24 0", fill: c.lip }), jsx("path", { d: "M-8 2 h16", stroke: c.inner, strokeWidth: 1 })] }));
};
const MOUTH_RENDERERS = {
    smile: MouthSmile, frown: MouthFrown, open: MouthOpen,
    flat: MouthFlat, o: MouthOpen, grin: MouthGrin, teeth: MouthGrin,
    smirk: MouthSmile, wow: MouthOpen, tongue: MouthOpen,
    laugh: MouthGrin, sad: MouthFrown, angry: MouthFrown,
    kiss: MouthOpen, grimace: MouthFlat,
};
const Mouth = ({ variant, ...rest }) => {
    var _a;
    const Comp = (_a = MOUTH_RENDERERS[variant]) !== null && _a !== void 0 ? _a : MouthSmile;
    return jsx(Comp, { ...rest });
};

export { MOUTH_RENDERERS, Mouth, MouthFlat, MouthFrown, MouthGrin, MouthOpen, MouthSmile };
//# sourceMappingURL=mouths.js.map
