// Ported from pizza-codex/src/ui/art/cardArt.tsx — TypeScript types removed,
// imports replaced with window globals (window.P), exports attached at end.
var P = window.P;
const FAMILY_COLORS = {
dough: { base: P.doughBase, deep: P.doughDeep, ink: P.brown },
sauce: { base: P.sauceBase, deep: P.sauceDeep, ink: P.brown },
topping: { base: P.toppingBase, deep: P.toppingDeep, ink: P.brown },
pizza: { base: P.pizzaBase, deep: P.pizzaDeep, ink: P.brown },
tool: { base: P.toolBase, deep: P.toolDeep, ink: P.brown },
disaster: { base: P.disasterBase, deep: P.disasterDeep, ink: P.cream },
joker: { base: P.jokerBase, deep: P.jokerDeep, ink: P.brown },
};
const FlourArt = () => (
UN
);
const WaterArt = () => (
);
const YeastArt = () => (
);
const TomatoArt = () => (
);
const SpiceArt = () => (
);
const OliveOilArt = () => (
);
const PepperoniArt = () => (
);
const MushroomArt = () => (
);
const OliveArt = () => (
);
const PepperArt = () => (
);
const OvenArt = () => (
);
const DoughArt = () => (
);
const SauceArt = () => (
SOS
);
const SliceArt = () => (
);
const FeastArt = () => (
);
const JokerArt = () => (
);
const HealthArt = () => (
);
const MoldArt = () => (
);
const RatArt = () => (
);
const YelpArt = () => (
1★
);
const CARD_VISUALS = {
flour: { label: 'F', Art: FlourArt, tag: 'Un', family: 'dough', tier: 'base' },
water: { label: 'W', Art: WaterArt, tag: 'Su', family: 'dough', tier: 'base' },
yeast: { label: 'Y', Art: YeastArt, tag: 'Maya', family: 'dough', tier: 'base' },
dough: { label: 'D', Art: DoughArt, tag: 'Hamur', family: 'dough', tier: 'crafted' },
tomatoes: { label: 'T', Art: TomatoArt, tag: 'Domates', family: 'sauce', tier: 'base' },
secretSpiceMix: { label: 'S', Art: SpiceArt, tag: 'Baharat', family: 'sauce', tier: 'base' },
oliveOil: { label: 'O', Art: OliveOilArt, tag: 'Yag', family: 'sauce', tier: 'base' },
sauce: { label: 'SC', Art: SauceArt, tag: 'Sos', family: 'sauce', tier: 'crafted' },
classicPepperoni: { label: 'P', Art: PepperoniArt, tag: 'Pepperoni', family: 'topping', tier: 'base' },
mushrooms: { label: 'M', Art: MushroomArt, tag: 'Mantar', family: 'topping', tier: 'base' },
blackOlives: { label: 'O', Art: OliveArt, tag: 'Zeytin', family: 'topping', tier: 'base' },
greenPeppers: { label: 'B', Art: PepperArt, tag: 'Biber', family: 'topping', tier: 'base' },
professionalOven: { label: 'OV', Art: OvenArt, tag: 'Firin', family: 'tool', tier: 'tool' },
neighborhoodSlice: { label: '1P', Art: SliceArt, tag: 'Dilim', family: 'pizza', tier: 'pizzaMid' },
familyFeast: { label: '3P', Art: FeastArt, tag: 'Ziyafet', family: 'pizza', tier: 'pizzaTop' },
healthInspection: { label: '!', Art: HealthArt, tag: 'Denetim', family: 'disaster', tier: 'disaster' },
mold: { label: 'X', Art: MoldArt, tag: 'Kuf', family: 'disaster', tier: 'disaster' },
nycRat: { label: 'R', Art: RatArt, tag: 'Fare', family: 'disaster', tier: 'disaster' },
badYelpReview: { label: '1*', Art: YelpArt, tag: 'Yelp', family: 'disaster', tier: 'disaster' },
jokerChef: { label: 'J', Art: JokerArt, tag: 'Joker', family: 'joker', tier: 'joker' },
};
function TierDecor({ tier, family, uid }) {
const c = FAMILY_COLORS[family];
if (tier === 'base') {
return (
);
}
if (tier === 'tool') {
return (
);
}
if (tier === 'disaster') {
return (
{[0, 8, 16, 24, 32, 40, 48].map((x) => (
))}
);
}
if (tier === 'joker') {
return (
{[[10,10],[54,10],[10,78],[54,78]].map(([x,y],i)=>(
))}
);
}
if (tier === 'crafted') {
const rays = Array.from({ length: 16 }, (_, i) => i);
return (
{rays.map((i) => (
))}
{[[8,8,0],[56,8,90],[56,80,180],[8,80,270]].map(([x,y,r],i)=>(
))}
);
}
if (tier === 'pizzaMid') {
const rays = Array.from({ length: 16 }, (_, i) => i);
return (
{rays.map((i) => (
))}
{[[8,8,0],[56,8,90],[56,80,180],[8,80,270]].map(([x,y,r],i)=>(
))}
);
}
if (tier === 'pizzaTop') {
const rays = Array.from({ length: 20 }, (_, i) => i);
return (
{rays.map((i) => (
))}
{[[8,12],[56,12],[8,76],[56,76]].map(([x,y],i)=>(
))}
);
}
return null;
}
function CardFace({ kind, w = 64, h = 88 }) {
const v = CARD_VISUALS[kind];
const Art = v.Art;
const c = FAMILY_COLORS[v.family];
const uid = `${kind}-${w}-${h}`;
const labelBg = v.tier === 'disaster' ? c.deep : P.cream;
const labelInk = v.tier === 'disaster' ? P.cream : P.brown;
const nameBg = v.tier === 'disaster' ? c.deep : P.cream;
const nameInk = v.tier === 'disaster' ? P.cream : P.brown;
const outerStroke = v.tier === 'pizzaTop' ? P.goldDeep : P.brown;
return (
);
}
function CardBack({ variant = 'red', w = 64, h = 88 }) {
const c = variant === 'mixed' ? { a: P.orange, c: P.green } : { a: P.red, c: P.yellow };
const patternId = `diag-${variant}-${w}-${h}`;
return (
);
}
Object.assign(window, { CARD_VISUALS, CardFace, CardBack });