// Renders the circular brass pet tag with curved engraving + embossed breed silhouette. // Pure SVG with gradients to fake brushed metal. Three finishes: brass / silver / copper. const FINISH_STOPS = { brass: { hi: '#F5E2B0', mid: '#E8C98A', base: '#C9A35E', shadow: '#7A5A2A', deep: '#3F2C12', engrave: '#3A2A12' }, silver: { hi: '#F4F4F4', mid: '#DCDCDC', base: '#B8B8B8', shadow: '#7A7A7A', deep: '#3A3A3A', engrave: '#2A2A2A' }, copper: { hi: '#F2C9A4', mid: '#D89A6E', base: '#B3754A', shadow: '#7A4424', deep: '#3F2010', engrave: '#3A1A0E' }, // 24k gold plating — richer chroma, brighter highlight, deeper engraving channel. gold: { hi: '#FFF1B8', mid: '#FBD968', base: '#E0B33B', shadow: '#9A6E14', deep: '#4A3008', engrave: '#3A2208' }, }; // Simple, restrained breed silhouettes — drawn from primitive shapes only. // Each is a viewBox 100×100 centered glyph the SVG s. const BREED_SHAPES = { labrador: (c) => ( {/* head */} {/* ears */} {/* snout */} {/* nose */} ), retriever: (c) => ( {/* floppy ears */} ), terrier: (c) => ( {/* pointed ears */} ), shepherd: (c) => ( {/* ears tall */} ), dachshund: (c) => ( {/* long body silhouette side view */} {/* head */} {/* ear */} {/* legs */} {/* tail */} ), bulldog: (c) => ( {/* small ears */} {/* jowls suggested */} ), poodle: (c) => ( {/* fluffy head — cluster of circles */} {/* snout */} ), cat: (c) => ( {/* triangular ears */} {/* inner ear */} {/* whiskers */} ), longhair: (c) => ( {/* fluffy round head */} {/* tufted cheek fluff */} {/* small ears, pushed back */} {/* flat snub nose */} {/* whiskers */} ), tabby: (c) => ( {/* sitting cat side-ish silhouette */} {/* head */} {/* ears */} {/* body — teardrop sitting */} {/* curled tail */} {/* face dot */} ), paw: (c) => ( ), }; const BREEDS = [ { id: 'labrador', name: 'Labrador', kind: 'dog' }, { id: 'retriever', name: 'Golden Retriever',kind: 'dog' }, { id: 'shepherd', name: 'German Shepherd', kind: 'dog' }, { id: 'terrier', name: 'Terrier', kind: 'dog' }, { id: 'dachshund', name: 'Dachshund', kind: 'dog' }, { id: 'bulldog', name: 'Bulldog', kind: 'dog' }, { id: 'poodle', name: 'Poodle', kind: 'dog' }, { id: 'cat', name: 'Short-haired Cat',kind: 'cat' }, { id: 'longhair', name: 'Long-haired Cat', kind: 'cat' }, { id: 'tabby', name: 'Sitting Cat', kind: 'cat' }, { id: 'paw', name: 'Generic Paw', kind: 'either' }, ]; function TagPreview({ name = 'BARNABY', phone = '(415) 555-0119', breed = 'labrador', finish = 'brass', size = 360, uid = 'main' }) { const stops = FINISH_STOPS[finish] || FINISH_STOPS.brass; const r = 180; const cx = 200, cy = 200; const topRadius = 142; // path radius for top text const botRadius = 142; // for bottom text const Shape = BREED_SHAPES[breed] || BREED_SHAPES.paw; const upperName = (name || 'YOUR PET').toUpperCase(); const phoneTxt = (phone || '').toUpperCase(); const gid = `tag-${uid}`; return ( {/* brushed metal radial */} {/* rim shading */} {/* brushed striations */} {/* engrave shadow */} {/* drop shadow under tag */} {/* text path along top */} {/* text path along bottom */} {/* split ring loop at top */} {/* tag body */} {/* outer shadow disc */} {/* face */} {/* engraved inner ring */} {/* hole for ring at top */} {/* top curved name */} {upperName} {/* center embossed breed silhouette */} {Shape(stops.engrave)} {/* small ornament divider line */} {/* bottom curved phone */} {phoneTxt} ); } window.TagPreview = TagPreview; window.BREEDS = BREEDS;