{"version":3,"file":"Checkfront.QO2PhIvi.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/sUKFqFkfHQwdBgyH41hn/WRIjRrWQfylakNjgyGuR/Checkfront.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState}from\"react\";// Learn more: https://www.framer.com/docs/guides/code-components/\nexport default function Checkfront(props){const{category_id,item_id,cf_url,style}=props;const[hasWidget,setHasWidget]=useState(false);const widgetId=category_id+\"_\"+item_id+\"_checkfront\";// console.log(\"this props\", id, props)\nuseEffect(()=>{if(window.DROPLET){setHasWidget(true);const DROPLET=window.DROPLET;// console.log(\"in effect\", DROPLET, item_id, category_id)\nnew DROPLET.Widget({host:cf_url,target:widgetId,item_id:item_id,category_id:category_id,options:\"tabs\",provider:\"droplet\"}).render();}// console.log(\"in effect\", window)\n},[]);// \"...style\" enables switching between auto & fixed sizing\n// Learn more: https://www.framer.com/docs/guides/auto-sizing\nreturn(/*#__PURE__*/ _jsx(\"div\",{style:{...style},id:widgetId,children:/*#__PURE__*/ _jsx(\"p\",{id:widgetId+\"_LOADER\",style:{background:`url(\"//${cf_url}/images/loader.gif\") left center no-repeat`,padding:\"5px 5px 5px 20px\"},children:\"Searching Availability...\"})}));};Checkfront.defaultProps={category_id:\"\",item_id:\"\",cf_url:\"secretcityadventures.checkfront.com\"};// Learn More: https://www.framer.com/docs/property-controls/\naddPropertyControls(Checkfront,{category_id:{title:\"Category ID\",type:ControlType.String},item_id:{title:\"Item ID\",type:ControlType.String},cf_url:{title:\"URL for Checkfront\",type:ControlType.String}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Checkfront\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Checkfront.map"],"mappings":"+LACA,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,cAAY,UAAQ,SAAO,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAS,EAAY,IAAI,EAAQ,cAK7K,OAJA,MAAc,CAAI,EAAO,UAAS,EAAa,GAAK,CACpD,IADmE,EAAO,QAC9D,OAAO,CAAC,KAAK,EAAO,OAAO,EAAiB,UAAoB,cAAY,QAAQ,OAAO,SAAS,UAAU,CAAC,CAAC,QAAQ,GAClI,EAAE,CAAC,CAEgB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,CAAC,GAAG,EAAS,SAAuB,EAAK,IAAI,CAAC,GAAG,EAAS,UAAU,MAAM,CAAC,WAAW,UAAU,EAAO,4CAA4C,QAAQ,mBAAmB,CAAC,SAAS,4BAA4B,CAAC,CAAC,CAAC,sBAN7N,IAAoD,IAAsC,CAMuI,EAAW,aAAa,CAAC,YAAY,GAAG,QAAQ,GAAG,OAAO,sCAAsC,CAC5W,EAAoB,EAAW,CAAC,YAAY,CAAC,MAAM,cAAc,KAAK,EAAY,OAAO,CAAC,QAAQ,CAAC,MAAM,UAAU,KAAK,EAAY,OAAO,CAAC,OAAO,CAAC,MAAM,qBAAqB,KAAK,EAAY,OAAO,CAAC,CAAC"}