{"version":3,"file":"SimulatorWrapper.U4FornWZ.mjs","names":["React.useState"],"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":"sPAAkY,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,aAAW,YAAU,cAAY,UAAQ,WAAS,WAAS,eAAa,aAAW,kBAAgB,SAAO,EAAW,CAAC,EAAM,GAAUA,EAAe,EAAK,EAAO,CAAC,GAAO,EAAe,CAAO,EAAQ,EAAQ,EAAY,EAAM,EAAY,EAA0F,OAAoB,EAAK,IAAI,CAAC,KAAtG,EAAgB,CAAC,aAAW,YAAU,cAAY,OAAO,EAAM,MAAM,CAA8C,EAAE,IAAI,sBAAsB,YAAY,EAAM,GAAU,WAAW,EAAE,iBAAiB,EAAS,EAAI,EAAE,iBAAiB,CAAC,EAAS,EAAK,CAAE,EAAE,MAAM,CAAC,eAAe,OAAO,QAAQ,QAAQ,OAAO,UAAU,WAAW,6BAA6B,eAAa,gBAAgB,EAAQ,EAAgB,EAAW,GAAG,CAAK,EAAW,UAAQ,CAAC,CAAE,iBAA7kC,IAA4B,IAAgE,IAAgI,IAA2H,EAAuvB,EAAoB,EAAiB,CAAC,WAAW,CAAC,KAAK,EAAY,KAAK,MAAM,aAAa,QAAQ,CAAC,YAAY,SAAS,YAAY,iBAAiB,EAAE,aAAa,CAAC,YAAY,SAAS,YAAY,iBAAiB,EAAE,aAAa,WAAW,EAAE,UAAU,CAAC,KAAK,EAAY,KAAK,M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