{"version":3,"file":"Claude_CardPrice.DpQBzphT.mjs","names":["__esmMin","p","init_jsx_runtime","addPropertyControls","init_framer_BL70qLPA","ControlType","HarmonyCardPrice","props","priceA","parsePrice","priceOptionA","priceB","priceOptionB","display","showPrefix","numeric","bodyFont","prefix","init_Claude_CardPrice","raw","x","m","price"],"sources":["https:/framerusercontent.com/modules/j9QwwFJr3xup72lcQ2wN/wruc8fQ0lYv6DXUzZsWR/Claude_CardPrice.js"],"sourcesContent":["import{jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// =============================================================\n// Harmony Wellness — Card Price\n// One line of text for listing/category cards. Reads the SAME\n// \"label | price | was | badge | note\" fields the PDP pricing\n// selector uses, and shows whichever price is lower with a\n// \"From\" prefix — or the single price, with no prefix, when the\n// product only has one option.\n//\n// Kept separate from HarmonyPricingSelector on purpose: a card\n// needs one line of text, not the full selector with its toggle\n// and state/pharmacy steps.\n// Paste into Framer: Assets → Code → New Code File.\n// =============================================================\nconst parsePrice=raw=>{const p=(raw||\"\").split(\"|\").map(x=>x.trim());return p[1]||\"\";};// \"$199/mo\" | \"$89\" → 199 / 89, for comparison only\nconst numeric=price=>{const m=(price||\"\").match(/[\\d,.]+/);return m?parseFloat(m[0].replace(\",\",\"\")):Infinity;};/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function HarmonyCardPrice(props){const{priceOptionA,priceOptionB,prefix,color,fontSize,fontWeight,bodyFont}=props;const priceA=parsePrice(priceOptionA);const priceB=parsePrice(priceOptionB);let display=priceA;let showPrefix=false;if(priceA&&priceB){display=numeric(priceA)<=numeric(priceB)?priceA:priceB;showPrefix=true;}if(!display)return null;return /*#__PURE__*/_jsxs(\"span\",{style:{fontFamily:bodyFont,fontSize,fontWeight,color,whiteSpace:\"nowrap\"},children:[showPrefix?`${prefix} `:\"\",display]});}HarmonyCardPrice.defaultProps={priceOptionA:\"Monthly | $199/mo | | | Billed monthly. Cancel anytime.\",priceOptionB:\"\",prefix:\"From\",color:\"#1a293e\",fontSize:18,fontWeight:600,bodyFont:\"'IBM Plex Sans', sans-serif\"};addPropertyControls(HarmonyCardPrice,{priceOptionA:{type:ControlType.String,title:\"Option A\"},priceOptionB:{type:ControlType.String,title:\"Option B\"},prefix:{type:ControlType.String,title:\"Prefix\"},color:{type:ControlType.Color,title:\"Color\"},fontSize:{type:ControlType.Number,title:\"Font size\",min:10,max:40},fontWeight:{type:ControlType.Enum,title:\"Weight\",options:[400,500,600,700],optionTitles:[\"Regular\",\"Medium\",\"Semibold\",\"Bold\"]},bodyFont:{type:ControlType.String,title:\"Font\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HarmonyCardPrice\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Claude_CardPrice.map"],"mappings":"A,4JAiBG,SAAwBM,EAAiB,EAAM,CAAC,GAAK,CAAC,eAAa,eAAa,SAAO,QAAM,WAAS,aAAW,YAAUC,EAAYC,EAAOC,EAAWC,CAAY,EAAQC,EAAOF,EAAWG,CAAY,EAAMC,EAAQL,EAAWM,EAAW,GAAyH,OAAhHN,GAAQG,IAAQ,EAAQI,EAAQP,CAAM,GAAGO,EAAQJ,CAAM,EAAEH,EAAOG,EAAO,EAAW,IAAUE,EAAwC,gBAAM,OAAO,CAAC,MAAM,CAAC,WAAWG,EAAS,WAAS,aAAW,QAAM,WAAW,QAAQ,EAAE,SAAS,CAACF,EAAW,GAAGG,EAAO,GAAG,GAAGJ,CAAO,CAAC,CAAC,EAA/J,IAAiK,C,8CAJjgB,EAAW,IAAeM,GAAK,GAAA,CAAI,MAAM,GAAG,CAAC,CAAC,IAAI,GAAGC,EAAE,KAAK,CAAU,CAAC,CAAC,IAAI,GAC5E,EAAQ,GAAO,CAAC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