{"version":3,"file":"TestIsac.D0oXWYws.mjs","names":["React.useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/c9zRSymEKL4w9gv5l5Rv/agkK2hWRs7NGcivZw4jQ/TestIsac.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";export default function PachetePromotionale(){// Opțiuni disponibile\nconst salonOptions=[\"Alege locația...\",\"Salon Baneasa\",\"Salon Drumul Taberei\",\"Salon Vitan\",\"Salon Titan\",\"Salon Victoriei\",\"Pantelimon\",\"Berceni\"];const packageOptions=[\"Alege zona...\",\"Brate + Axila\",\"Picioare parțial + Inghinal + Labe picior\",\"Picioare integral + Inghinal + Labe picior\",\"Inghinal + Interfesier\",\"Full Body\"];// Prețuri de bază per ședință (lei)\nconst basePrices={\"Brate + Axila\":327,\"Picioare parțial + Inghinal + Labe picior\":542,\"Picioare integral + Inghinal + Labe picior\":584,\"Inghinal + Interfesier\":215,\"Full Body\":1317};const sessionOptions=[{count:1,discount:0},{count:4,discount:10},{count:8,discount:15}];// Harta link-uri Stripe pentru pachet + sesiuni\nconst stripeLinks={\"Brate + Axila\":{1:\"https://book.stripe.com/6oE4ie5mp8GUaOIaEQ\",4:\"https://book.stripe.com/4gw5mi8yB2iw4qk5kx\",8:\"https://book.stripe.com/6oE5mieWZ9KYf4Y5ky\"},\"Picioare parțial + Inghinal + Labe picior\":{1:\"https://book.stripe.com/4gw4ie9CF6yMf4Y6oD\",4:\"https://book.stripe.com/8wMaGC2ad1ese0U8wM\",8:\"https://book.stripe.com/eVa5mig131es8GA7sJ\"},\"Picioare integral + Inghinal + Labe picior\":{1:\"https://book.stripe.com/28o6qm9CF2iwbSMbIR\",4:\"https://book.stripe.com/aEU1622ad6yM3mg5ku\",8:\"https://book.stripe.com/eVaeWS9CF2iwf4Y00b\"},\"Inghinal + Interfesier\":{1:\"https://book.stripe.com/00geWS9CF8GU7Cw6ou\",4:\"https://book.stripe.com/3csbKGeWZ7CQ9KE6ov\",8:\"https://book.stripe.com/aEUaGCaGJ8GU4qkaEM\"},\"Full Body\":{1:\"https://book.stripe.com/eVacOK3eh0aof4YbIL\",4:\"https://book.stripe.com/28odSOg13bT68GA5ko\",8:\"https://book.stripe.com/aEUg0W6qt5uI6ysbIN\"}};// State-uri\nconst[selectedSalon,setSelectedSalon]=React.useState(salonOptions[0]);const[selectedPackage,setSelectedPackage]=React.useState(packageOptions[0]);const[selectedSessions,setSelectedSessions]=React.useState(null);const[errorLocation,setErrorLocation]=React.useState(false);const[errorPackage,setErrorPackage]=React.useState(false);// Validări\nconst hasLocation=selectedSalon!==salonOptions[0];const hasPackage=selectedPackage!==packageOptions[0];const hasValidSelection=hasLocation&&hasPackage&&selectedSessions!==null;// Calcul preț\nconst calculatePrice=()=>{if(!hasValidSelection)return{before:0,after:0,discount:0};const base=basePrices[selectedPackage];const cfg=sessionOptions.find(o=>o.count===selectedSessions);const total=base*cfg.count;const after=Math.round(total*(1-cfg.discount/100));return{before:total,after,discount:cfg.discount};};const price=calculatePrice();const noSpaceSalon=selectedSalon.replace(/\\s+/g,\"\").toLowerCase();const currentLink=hasValidSelection?`${stripeLinks[selectedPackage][selectedSessions]}?client_reference_id=${noSpaceSalon}`:undefined;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n        @keyframes shake {\n          0%, 100% { transform: translateX(0); }\n          20%, 60% { transform: translateX(-5px); }\n          40%, 80% { transform: translateX(5px); }\n        }\n        .pm-container { width:100%; max-width:500px; margin:0 auto; font-family:poppins; }\n        .pm-title { font-size:24px; font-weight:bold; margin-bottom:16px; }\n        .pm-label { font-size:14px; margin:12px 0 8px; font-weight:500; color:#8D0060; }\n        .pm-select { width:100%; padding:10px; border:1px solid #e6e6e6; border-radius:10px; font-size: 1.3em}\n        .pm-select.error { border-color:red; }\n        .pm-select.shake { animation: shake 0.3s ease; }\n        .error-text { color:red; font-size:14px; margin-top:4px; }\n        .pm-sessions { display:flex; gap:12px; margin-top:8px; }\n        .pm-card { flex:1; padding:14px; border:1px solid #f1f1f1; border-radius:14px; position:relative; cursor:pointer; text-align:center; box-shadow:0 2px 8px rgba(0,0,0,0.1); transition:box-shadow 0.2s ease,border-color 0.2s ease; }\n        .pm-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.15); }\n        .pm-card.selected { border:2px solid #e82397; background:#ffe4f0; box-shadow:0 4px 12px rgba(232,35,151,0.2); }\n        .pm-count { font-size:32px; font-weight:600; margin-bottom:4px; color:#8D0060; }\n        .pm-text { font-size:14px; text-transform:uppercase; letter-spacing:0.8px; margin-bottom:8px; color:#1d1d1d; }\n        .pm-price { font-size:12px; font-weight:medium; }\n        .pm-before { font-size:10px; text-decoration:line-through; margin-right:6px; color:#787878; }\n        .pm-discount { position: relative; position:absolute; top:2px; right:2px; background:#ffe4f0; color:#e82397; font-size:10px; font-weight:700; padding:4px 8px; border-radius:16px; transform:rotate(0deg); transform-origin:center; }\n        .pm-circle { position:absolute; top:6px; left:6px; width:18px; height:18px; border:2px solid #848484; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:10px; color:#fff; transition:background 0.2s ease, border-color 0.2s ease; }\n        .pm-card.selected .pm-circle { background:#e82397; border-color:#e82397; }\n        .pm-buy-button { width:100%; padding:12px; font-size:16px; border:none; border-radius:20px; margin-top:16px; background:#e82397; color:#fff; cursor:not-allowed; transition:background 0.2s ease; }\n        .pm-buy-button.enabled { background:#e82397; cursor:pointer; }\n      `}),/*#__PURE__*/_jsxs(\"div\",{className:\"pm-container\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"pm-title\",style:{color:\"#3D0025\",fontFamily:\"Poppins\",fontSize:\"20px\",fontWeight:\"600\"},children:\"Pachete Promoționale\"}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{className:\"pm-label\",children:\"1. Alege salonul:\"}),/*#__PURE__*/_jsx(\"select\",{className:errorLocation?\"pm-select error shake\":\"pm-select\",value:selectedSalon,onChange:e=>{setSelectedSalon(e.target.value);setErrorLocation(false);},children:salonOptions.map(salon=>/*#__PURE__*/_jsx(\"option\",{value:salon,children:salon},salon))}),errorLocation&&/*#__PURE__*/_jsx(\"div\",{className:\"error-text\",children:\"pentru a continua alege locația\"})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{className:\"pm-label\",children:\"2. Alege pachetul:\"}),/*#__PURE__*/_jsx(\"select\",{className:errorPackage?\"pm-select error shake\":\"pm-select\",value:selectedPackage,onChange:e=>{setSelectedPackage(e.target.value);setErrorPackage(false);},children:packageOptions.map(pkg=>/*#__PURE__*/_jsx(\"option\",{value:pkg,children:pkg},pkg))}),errorPackage&&/*#__PURE__*/_jsx(\"div\",{className:\"error-text\",children:\"pentru a continua alege pachetul\"})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{className:\"pm-label\",children:\"3. C\\xe2te ședințe dorești?\"}),/*#__PURE__*/_jsx(\"div\",{className:\"pm-sessions\",children:sessionOptions.map(opt=>{const isSel=selectedSessions===opt.count;const total=hasPackage?basePrices[selectedPackage]*opt.count:0;const disc=hasPackage?Math.round(total*(1-opt.discount/100)):0;return /*#__PURE__*/_jsxs(\"div\",{className:isSel?\"pm-card selected\":\"pm-card\",onClick:()=>{let missing=false;if(!hasLocation){setErrorLocation(true);missing=true;}if(!hasPackage){setErrorPackage(true);missing=true;}if(!missing){setSelectedSessions(opt.count);}},children:[/*#__PURE__*/_jsx(\"div\",{className:\"pm-circle\",children:isSel?\"✓\":\"\"}),opt.discount>0&&/*#__PURE__*/_jsxs(\"div\",{className:\"pm-discount\",children:[\"-\",opt.discount,\"%\"]}),/*#__PURE__*/_jsx(\"div\",{className:\"pm-count\",children:opt.count}),/*#__PURE__*/_jsx(\"div\",{className:\"pm-text\",children:opt.count>1?\"Ședințe\":\"Ședință\"}),/*#__PURE__*/_jsx(\"div\",{className:\"pm-price\",children:hasPackage?/*#__PURE__*/_jsxs(_Fragment,{children:[opt.discount>0&&/*#__PURE__*/_jsxs(\"span\",{className:\"pm-before\",children:[total.toLocaleString(\"ro-RO\"),\" \",\"lei\"]}),/*#__PURE__*/_jsxs(\"span\",{children:[disc.toLocaleString(\"ro-RO\"),\" \",\"lei\"]})]}):/*#__PURE__*/_jsx(\"span\",{children:\"-- lei\"})})]},opt.count);})})]}),/*#__PURE__*/_jsx(\"button\",{className:hasValidSelection?\"pm-buy-button enabled\":\"pm-buy-button\",disabled:!hasValidSelection,onClick:()=>hasValidSelection&&window.open(currentLink,\"_blank\"),children:hasValidSelection?`Cumpără acum - ${price.after.toLocaleString(\"ro-RO\")} lei`:\"Cumpără acum\"})]})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PachetePromotionale\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TestIsac.map"],"mappings":"iNAA2G,SAAwB,GAAqB,CACxJ,IAAM,EAAa,CAAC,mBAAmB,gBAAgB,uBAAuB,cAAc,cAAc,kBAAkB,aAAa,UAAU,CAAO,EAAe,CAAC,gBAAgB,gBAAgB,4CAA4C,6CAA6C,yBAAyB,YAAY,CAClU,EAAW,CAAC,gBAAgB,IAAI,4CAA4C,IAAI,6CAA6C,IAAI,yBAAyB,IAAI,YAAY,KAAK,CAAO,EAAe,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,SAAS,GAAG,CAAC,CACvQ,EAAY,CAAC,gBAAgB,CAAC,EAAE,6CAA6C,EAAE,6CAA6C,EAAE,6CAA6C,CAAC,4CAA4C,CAAC,EAAE,6CAA6C,EAAE,6CAA6C,EAAE,6CAA6C,CAAC,6CAA6C,CAAC,EAAE,6CAA6C,EAAE,6CAA6C,EAAE,6CAA6C,CAAC,y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