{"version":3,"file":"SimulatorWrapper.CZLxlyI6.mjs","names":["React.useState","__esmMin","init_npm_react_18_3_1","_e","c","init_jsx_runtime","useTracking","addPropertyControls","init_framer_CN96F41L","ControlType","useSimulatorURL","init_CreditStore","useCreditStore","init_useSimulatorURL","SimulatorWrapper","props","hover","setHover","store","groupId","isHover","track","targetUrl","tracking","hoverBackground","background","style","init_SimulatorWrapper"],"sources":["https:/framerusercontent.com/modules/HTxc5i8fnwfXIgauSGXY/grV29yqc63EGz7ixiqz5/SimulatorWrapper.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useTracking}from\"framer\";import{useSimulatorURL}from\"https://framerusercontent.com/modules/6yTW9nDSqM7wcBWAdnDT/IiCOToR85aboVCTCweHa/useSimulatorURL.js\";import{useCreditStore}from\"https://framerusercontent.com/modules/SwnDQm82Xt81SD83IHNA/sIfV2WMlF4kx8NLFkZvH/CreditStore.js\";export default function SimulatorWrapper(props){const{destinyURL,staticURL,extraParams,groupId,tracking,children,borderRadius,background,hoverBackground,style}=props;const[hover,setHover]=React.useState(false);const[store]=useCreditStore(groupId);const isHover=hover;const track=useTracking();const targetUrl=useSimulatorURL({destinyURL,staticURL,extraParams,credit:store.credit});return /*#__PURE__*/_jsx(\"a\",{href:targetUrl,rel:\"noopener noreferrer\",onClick:()=>track(tracking||\"simulador\"),onMouseEnter:()=>setHover(true),onMouseLeave:()=>{setHover(false);},style:{textDecoration:\"none\",display:\"block\",cursor:\"pointer\",transition:\"background-color 0.2s ease\",borderRadius,backgroundColor:isHover?hoverBackground:background,...style},children:children});}addPropertyControls(SimulatorWrapper,{destinyURL:{type:ControlType.Enum,title:\"destinyURL\",options:[\"simulador\",\"seguro\",\"consorcio\",\"compraplanejada\"],optionTitles:[\"simulador\",\"seguro\",\"consorcio\",\"compraplanejada\"],defaultValue:\"simulador\"},staticURL:{type:ControlType.Enum,title:\"staticURL\",options:[\"none\",\"auto\",\"celular\",\"cnh\",\"computador\",\"games\",\"imovel\",\"moto\",\"pesado\",\"viagem\"],optionTitles:[\"none\",\"auto\",\"celular\",\"cnh\",\"computador\",\"games\",\"imovel\",\"moto\",\"pesado\",\"viagem\"],defaultValue:\"none\"},extraParams:{type:ControlType.String,title:\"extraParams\",defaultValue:\"\"},groupId:{type:ControlType.String,title:\"Group ID\",defaultValue:\"\"},tracking:{type:ControlType.String,title:\"tracking\",defaultValue:\"simulador\"},background:{type:ControlType.Color,title:\"background\",defaultValue:\"rgba(30, 33, 37, 0)\"},hoverBackground:{type:ControlType.Color,title:\"hoverBackground\",defaultValue:\"rgba(30, 33, 37, 0.08)\"},borderRadius:{type:ControlType.BorderRadius,title:\"borderRadius\",defaultValue:\"24px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SimulatorWrapper\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,4PAAkY,SAAwBc,EAAiB,EAAM,CAAC,GAAK,CAAC,aAAW,YAAU,cAAY,UAAQ,WAAS,WAAS,eAAa,aAAW,kBAAgB,SAAOC,EAAW,CAACC,EAAMC,GAAUjB,EAAe,EAAK,EAAO,CAACkB,GAAON,EAAeO,CAAO,EAAQC,EAAQJ,EAAYK,EAAMf,EAAY,EAAQgB,EAAUZ,EAAgB,CAAC,aAAW,YAAU,cAAY,OAAOQ,EAAM,MAAM,CAAC,EAAE,MAAoB,gBAAK,IAAI,CAAC,KAAKI,EAAU,IAAI,sBAAsB,YAAYD,EAAME,GAAU,WAAW,EAAE,iBAAiBN,EAAS,EAAI,EAAE,iBAAiB,CAACA,EAAS,EAAK,CAAE,EAAE,MAAM,CAAC,eAAe,OAAO,QAAQ,QAAQ,OAAO,UAAU,WAAW,6BAA6B,eAAa,gBAAgBG,EAAQI,EAAgBC,EAAW,GAAGC,CAAK,EAAW,UAAQ,CAAC,CAAE,C,kDAACnB,EAA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