{"version":3,"file":"SimulatorWrapper.k5Bl7hqB.mjs","names":["React.useState","_jsx","__esmMin","init_npm_react_18_3_1","_e","c","init_jsx_runtime","useTracking","addPropertyControls","init_framer_ChujFWHC","ControlType","useSimulatorURL","init_CreditStore","useCreditStore","init_useSimulatorURL","SimulatorWrapper","props","destinyURL","staticURL","extraParams","groupId","tracking","children","borderRadius","background","hoverBackground","style","hover","setHover","store","isHover","track","targetUrl","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,SAAwBe,EAAiBC,EAAM,CAAC,GAAK,CAACC,aAAWC,YAAUC,cAAYC,UAAQC,WAASC,WAASC,eAAaC,aAAWC,kBAAgBC,SAAOV,EAAW,CAACW,EAAMC,GAAU5B,EAAe,EAAK,EAAO,CAAC6B,GAAOhB,EAAeO,CAAO,EAAQU,EAAQH,EAAYI,EAAMxB,EAAY,EAAQyB,EAAUrB,EAAgB,CAACM,aAAWC,YAAUC,cAAY,OAAOU,EAAM,MAAM,CAAC,EAAE,MAAoB5B,gBAAK,IAAI,CAAC,KAAK+B,EAAU,IAAI,sBAAsB,YAAYD,EAAMV,GAAU,WAAW,EAAE,iBAAiBO,EAAS,EAAI,EAAE,iBAAiB,CAACA,EAAS,EAAK,CAAE,EAAE,MAAM,CAAC,eAAe,OAAO,QAAQ,QAAQ,OAAO,UAAU,WAAW,6BAA6BL,eAAa,gBAAgBO,EAAQL,EAAgBD,EA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