{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/rWt0AqVP3GgT7PdXrPDL/aRZRlK0unoceJUnYGkYL/ImageProps.js", "ssg:https://framerusercontent.com/modules/yT96g0t9yHdUXCNRE0PS/qSbqJ6O8QIRFhSOjTNxn/ClipboardPlusRecordRemixes.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import React from\"react\";export default function Image(props){const{src,fit,alt,borderRadius,border,shadow,style,fallbackImage,fallbackFit=\"fit\"}=props;const[imgError,setImgError]=React.useState(false);const effectiveSrc=imgError?fallbackImage?.src||\"\":src;const effectiveAlt=imgError?fallbackImage?.alt||alt:alt;const effectiveFit=imgError?fallbackFit:fit;let objectFit=\"cover\";if(effectiveFit===\"fit\")objectFit=\"contain\";else if(effectiveFit===\"stretch\")objectFit=\"fill\";else if(effectiveFit===\"fill\")objectFit=\"cover\";const content=/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius,boxShadow:shadow,...border,...style},children:effectiveSrc?/*#__PURE__*/_jsx(\"img\",{src:effectiveSrc,alt:effectiveAlt||\"\",onError:()=>setImgError(true),style:{width:\"100%\",height:\"100%\",objectFit,borderRadius,display:\"block\",padding:0,margin:0},draggable:false}):null});const linkUrl=typeof props.link===\"object\"&&props.link!==null?props.link.url||\"\":typeof props.link===\"string\"?props.link:\"\";const isValidLink=typeof linkUrl===\"string\"&&linkUrl.trim()!==\"\";if(isValidLink){const isExternal=linkUrl.startsWith(\"http\");return /*#__PURE__*/_jsx(\"a\",{href:linkUrl,target:isExternal?\"_blank\":\"_self\",rel:isExternal?\"noopener noreferrer\":undefined,style:{display:\"block\",width:\"100%\",height:\"100%\",textDecoration:\"none\"},children:content});}return content;}addPropertyControls(Image,{src:{type:ControlType.String,title:\"Image URL\",defaultValue:\"\",placeholder:\"Paste image URL\u2026\"},fit:{type:ControlType.Enum,title:\"Type\",options:[\"fill\",\"fit\",\"stretch\",\"tile\"],optionTitles:[\"Fill\",\"Fit\",\"Stretch\",\"Tile\"],defaultValue:\"fit\",displaySegmentedControl:false},alt:{type:ControlType.String,title:\"Alt Text\",defaultValue:\"\",placeholder:\"Alt text for accessibility\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:64},border:{type:ControlType.Border,title:\"Border\",optional:true},shadow:{type:ControlType.BoxShadow,title:\"Shadows\"},fallbackImage:{type:ControlType.ResponsiveImage,title:\"Fallback Image\"},fallbackFit:{type:ControlType.Enum,title:\"Fallback Type\",options:[\"fill\",\"fit\",\"stretch\",\"tile\"],optionTitles:[\"Fill\",\"Fit\",\"Stretch\",\"Tile\"],defaultValue:\"fill\",displaySegmentedControl:false},link:{type:ControlType.Link,title:\"Link\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Image\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageProps.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState}from\"react\";const remixStore=typeof window!==\"undefined\"?window.__remixStore__||={}:{};export default function ClipboardPlusRecordRemixes(props){const{content,label,remixMode,componentId,supabaseUrl,supabaseKey,tableName}=props;const[copied,setCopied]=useState(false);const[remixCount,setRemixCount]=useState(0);useEffect(()=>{if(!remixMode||remixMode===\"display\"||!componentId)return;fetch(`${supabaseUrl}/rest/v1/${tableName}?component_id=eq.${encodeURIComponent(componentId)}`,{method:\"GET\",headers:{apikey:supabaseKey,Authorization:`Bearer ${supabaseKey}`,\"Content-Type\":\"application/json\",Prefer:\"return=representation\"}}).then(async res=>{const rows=await res.json();if(rows[0]?.remixes!==undefined){remixStore[componentId]=rows[0].remixes;setRemixCount(rows[0].remixes);}}).catch(()=>{});},[supabaseUrl,supabaseKey,tableName,componentId,remixMode]);useEffect(()=>{const interval=setInterval(()=>{if(remixStore[componentId]!==undefined&&remixStore[componentId]!==remixCount){setRemixCount(remixStore[componentId]);}},500);return()=>clearInterval(interval);},[componentId,remixCount]);const handleClick=async()=>{if(!content)return;await navigator.clipboard.writeText(content);setCopied(true);setTimeout(()=>setCopied(false),1500);if(!remixMode||remixMode===\"display\"||!componentId)return;fetch(`${supabaseUrl}/rest/v1/${tableName}?component_id=eq.${encodeURIComponent(componentId)}`,{method:\"GET\",headers:{apikey:supabaseKey,Authorization:`Bearer ${supabaseKey}`,\"Content-Type\":\"application/json\",Prefer:\"return=representation\"}}).then(async res=>{const rows=await res.json();if(rows.length>0){const newCount=(rows[0].remixes||0)+1;remixStore[componentId]=newCount;setRemixCount(newCount);return fetch(`${supabaseUrl}/rest/v1/${tableName}?component_id=eq.${encodeURIComponent(componentId)}`,{method:\"PATCH\",headers:{apikey:supabaseKey,Authorization:`Bearer ${supabaseKey}`,\"Content-Type\":\"application/json\",Prefer:\"return=representation\"},body:JSON.stringify({remixes:newCount})});}else{remixStore[componentId]=1;setRemixCount(1);return fetch(`${supabaseUrl}/rest/v1/${tableName}`,{method:\"POST\",headers:{apikey:supabaseKey,Authorization:`Bearer ${supabaseKey}`,\"Content-Type\":\"application/json\",Prefer:\"return=representation\"},body:JSON.stringify({component_id:componentId,remixes:1})});}}).catch(()=>{});};return /*#__PURE__*/_jsxs(\"button\",{onClick:handleClick,\"aria-label\":label,style:{width:\"100%\",height:\"100%\",border:\"none\",borderRadius:48,background:\"transparent\",cursor:\"pointer\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",width:1,height:1,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",border:0},children:copied?\"Copied!\":label||\"Copy\"}),(remixMode===\"display\"||remixMode===\"both\")&&/*#__PURE__*/_jsx(\"div\",{style:{fontSize:12,marginTop:4,textAlign:\"center\",...props.font,color:props.textColor},children:remixCount})]});}addPropertyControls(ClipboardPlusRecordRemixes,{label:{type:ControlType.String,title:\"Label\"},content:{type:ControlType.String,title:\"Clipboard\"},supabaseUrl:{type:ControlType.String,title:\"Project URL\"},supabaseKey:{type:ControlType.String,title:\"Public Key\",obscured:true},tableName:{type:ControlType.String,title:\"Table Name\"},componentId:{type:ControlType.String,title:\"Component ID\"},remixMode:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Remix Mode\",options:[\"both\",\"record\",\"display\"],optionTitles:[\"Both\",\"Record\",\"Display\"],defaultValue:\"record\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Regular\",letterSpacing:\"0em\",lineHeight:\"16px\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#161616\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ClipboardPlusRecordRemixes\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ClipboardPlusRecordRemixes.map"],
  "mappings": "8HAAuI,SAARA,EAAuBC,EAAM,CAAC,GAAK,CAAC,IAAAC,EAAI,IAAAC,EAAI,IAAAC,EAAI,aAAAC,EAAa,OAAAC,EAAO,OAAAC,EAAO,MAAAC,EAAM,cAAAC,EAAc,YAAAC,EAAY,KAAK,EAAET,EAAW,CAACU,EAASC,CAAW,EAAEC,EAAM,SAAS,EAAK,EAAQC,EAAaH,EAASF,GAAe,KAAK,GAAGP,EAAUa,EAAaJ,GAASF,GAAe,KAAKL,EAAcY,EAAaL,EAASD,EAAYP,EAAQc,EAAU,QAAWD,IAAe,MAAMC,EAAU,UAAkBD,IAAe,UAAUC,EAAU,OAAeD,IAAe,SAAOC,EAAU,SAAQ,IAAMC,EAAqB,EAAK,MAAM,CAAC,MAAM,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S,OAAO,QAAQ,UAAU,cAAc,MAAM,WAAW,MAAM,CAAC,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,MAAM,aAAa,aAAa,SAAS,CAAC,CAAC",
  "names": ["Image", "props", "src", "fit", "alt", "borderRadius", "border", "shadow", "style", "fallbackImage", "fallbackFit", "imgError", "setImgError", "e", "effectiveSrc", "effectiveAlt", "effectiveFit", "objectFit", "content", "linkUrl", "isExternal", "addPropertyControls", "ControlType", "remixStore", "window", "ClipboardPlusRecordRemixes", "props", "content", "label", "remixMode", "componentId", "supabaseUrl", "supabaseKey", "tableName", "copied", "setCopied", "ye", "remixCount", "setRemixCount", "ue", "res", "rows", "interval", "u", "navigator", "newCount", "addPropertyControls", "ControlType"]
}
