'use strict';

var jsxRuntime = require('react/jsx-runtime');
var characterTypes = require('../characterTypes.js');

function pal(c) {
    return {
        lip: characterTypes.pick(c, 0, "var(--anim-lip, #E11D48)"),
        inner: characterTypes.pick(c, 1, "var(--anim-inner, #FEE2E2)"),
        stroke: characterTypes.pick(c, 2, "var(--anim-stroke, #111)"),
    };
}
const MouthSmile = ({ colors, y = 8, scale = 1, transform, strokeWidth = 1.6 }) => {
    const c = pal(colors);
    return (jsxRuntime.jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, strokeLinecap: "round", children: jsxRuntime.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 (jsxRuntime.jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, strokeLinecap: "round", children: jsxRuntime.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 (jsxRuntime.jsxs("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, children: [jsxRuntime.jsx("ellipse", { cx: 0, cy: 2, rx: 8, ry: 6, fill: c.inner }), jsxRuntime.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 (jsxRuntime.jsx("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, strokeLinecap: "round", children: jsxRuntime.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 (jsxRuntime.jsxs("g", { transform: `${transform !== null && transform !== void 0 ? transform : ""} translate(0 ${y}) scale(${scale})`, stroke: c.stroke, strokeWidth: strokeWidth, children: [jsxRuntime.jsx("path", { d: "M-12 0 q12 16 24 0", fill: c.lip }), jsxRuntime.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 jsxRuntime.jsx(Comp, { ...rest });
};

exports.MOUTH_RENDERERS = MOUTH_RENDERERS;
exports.Mouth = Mouth;
exports.MouthFlat = MouthFlat;
exports.MouthFrown = MouthFrown;
exports.MouthGrin = MouthGrin;
exports.MouthOpen = MouthOpen;
exports.MouthSmile = MouthSmile;
//# sourceMappingURL=mouths.js.map
