{"version":3,"file":"DataCollector.DgPyYghH.mjs","names":[],"sources":["https:/framerusercontent.com/modules/2PJ0xjtD14qcrSkFLRbQ/TryRZ7KRllVHy92GzhEY/DataCollector.js"],"sourcesContent":["import{jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{setItem}from\"https://framerusercontent.com/modules/4YOZYtUnHpMfvTWCPE8e/P5ATA0Wth6xQbXtA6q08/PriceStore.js\";export default function DataCollector(props){const{priceId,price,title,discount,dynamicPrice,font,color,suffix}=props;// Jednoduchá logika: Ak to nie je true, je to false.\nconst isDynamic=dynamicPrice===true;React.useEffect(()=>{if(priceId){setItem(String(priceId),parseFloat(price)||0,title||\"\",discount||\"Standard\",isDynamic);}},[priceId,price,title,discount,isDynamic]);const formattedPrice=price!==undefined?price.toLocaleString(\"sk-SK\",{maximumFractionDigits:0}):\"0\";// RÖNTGEN: Ukáže, či je vstup naozaj zapnutý\nconst debugStatus=isDynamic?\"ZAPNUT\\xc9 (True)\":\"VYPNUT\\xc9 (False)\";const debugColor=isDynamic?\"#e53e3e\":\"#38a169\";return /*#__PURE__*/_jsxs(\"div\",{style:{...font,color:color,display:\"flex\",flexDirection:\"column\",alignItems:\"flex-start\",whiteSpace:\"pre-wrap\"},children:[/*#__PURE__*/_jsxs(\"div\",{children:[formattedPrice,suffix]}),/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:10,marginTop:4,padding:\"2px 6px\",background:\"#f0f0f0\",border:\"1px solid #ccc\",borderRadius:4,color:debugColor,fontWeight:\"bold\",fontFamily:\"monospace\"},children:[\"ID: \",priceId,\" | \",debugStatus]})]});}addPropertyControls(DataCollector,{priceId:{type:ControlType.String,title:\"Price_ID\"},title:{type:ControlType.String,title:\"N\\xe1zov\"},price:{type:ControlType.Number,title:\"Cena\"},discount:{type:ControlType.String,title:\"Discount\",defaultValue:\"Standard\"},// ZMENA: Vraciame sa k prísnemu Booleanu\ndynamicPrice:{type:ControlType.Boolean,title:\"Dynamic Price\",defaultValue:false,description:\"Mus\\xed byť prepojen\\xe9 s CMS poľom typu Boolean (Yes/No)\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\" €\"},font:{type:ControlType.Font,title:\"Typografia\",controls:\"extended\"},color:{type:ControlType.Color,title:\"Farba\",defaultValue:\"#333333\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DataCollector\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"gOAAgP,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,UAAQ,QAAM,QAAM,WAAS,eAAa,OAAK,QAAM,UAAQ,EAC1V,EAAU,IAAe,GAAK,MAAoB,CAAI,GAAS,EAAQ,OAAO,CAAO,EAAE,WAAW,CAAK,GAAG,EAAE,GAAO,GAAG,GAAU,WAAW,CAAS,CAAG,EAAE,CAAC,EAAQ,EAAM,EAAM,EAAS,CAAS,CAAC,EAAE,IAAM,EAAe,IAAQ,IAAA,GAAkE,IAAxD,EAAM,eAAe,QAAQ,CAAC,sBAAsB,CAAC,CAAC,EAChS,EAAY,EAAU,iBAAoB,kBAA2B,EAAW,EAAU,UAAU,UAAU,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAW,QAAM,QAAQ,OAAO,cAAc,SAAS,WAAW,aAAa,WAAW,UAAU,EAAE,SAAS,CAAc,EAAM,MAAM,CAAC,SAAS,CAAC,EAAe,CAAM,CAAC,CAAC,EAAe,EAAM,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,UAAU,EAAE,QAAQ,UAAU,WAAW,UAAU,OAAO,iBAAiB,aAAa,EAAE,MAAM,EAAW,WAAW,OAAO,WAAW,WAAW,EAAE,SAAS,CAAC,OAAO,EAAQ,MAAM,CAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,iBAFnhB,IAA4B,IAAoD,IAAmH,EAEiV,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