{"version":3,"file":"Empty_State.d5SWoUlg.mjs","names":["useState","useRef","__esmMin","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ce","de","RenderTarget","addPropertyControls","init_framer_BWFVvmND","ControlType","BroadcastEmptyState","isEmpty","setIsEmpty","BROADCAST_ID","observer","isCanvas","checkEmptyState","broadcasterElements","broadcaster","visibleCount","child","containerStyle","props","init_Empty_State"],"sources":["https:/framerusercontent.com/modules/SAEhOM2ozTj07wh2SN5b/BxhwW6xJNchRFepMgqVp/Empty_State.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function BroadcastEmptyState(props){const[isEmpty,setIsEmpty]=useState(false);const BROADCAST_ID=\"3.14px solid transparent\";const observer=useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(!isCanvas){// Initial check\ncheckEmptyState();// Set up a mutation observer to watch for DOM changes\nobserver.current=new MutationObserver(()=>{checkEmptyState();});// Find the broadcaster element\nconst broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){// Watch for changes to the broadcaster and its children\nobserver.current.observe(broadcasterElements[0],{childList:true,subtree:true,attributes:true,attributeFilter:[\"style\",\"data-filter-\",\"data-search-\"]});}// Clean up on unmount\nreturn()=>{if(observer.current){observer.current.disconnect();}};}},[isCanvas]);const checkEmptyState=()=>{// Check DOM directly to count visible items\nconst broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){const broadcaster=broadcasterElements[0];const children=Array.from(broadcaster.children);// Count visible items (items that aren't display: none)\nconst visibleCount=children.filter(child=>child.style.display!==\"none\").length;setIsEmpty(visibleCount===0);}};// Container style with minimum dimensions\nconst containerStyle={width:\"100%\",height:\"100%\",minWidth:\"50px\",minHeight:\"50px\"};// Basic empty state to show in canvas when nothing connected\nconst EmptyStatePlaceholder=()=>/*#__PURE__*/_jsxs(\"div\",{style:{...containerStyle,backgroundColor:\"rgba(136, 85, 255, 0.1)\",border:\"1px dashed #9966FF\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",padding:\"20px\",borderRadius:\"8px\",color:\"#9966FF\",fontFamily:\"sans-serif\",textAlign:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"32px\",marginBottom:\"16px\"},children:\"📭\"}),/*#__PURE__*/_jsx(\"div\",{style:{fontWeight:\"bold\",fontSize:\"16px\",marginBottom:\"8px\"},children:\"Empty State Display\"}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"12px\"},children:\"Connect an instance to show when no results are found\"})]});// In canvas mode, either show connected instance or placeholder\nif(isCanvas){if(props.emptyStateInstance){return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:props.emptyStateInstance});}else{return /*#__PURE__*/_jsx(EmptyStatePlaceholder,{});}}// In production, only show when empty\nif(!isEmpty)return null;return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:props.emptyStateInstance||null});}// Property controls\naddPropertyControls(BroadcastEmptyState,{emptyStateInstance:{type:ControlType.ComponentInstance,title:\"Empty State\",description:\"v3.0 \\n[via SegmentUI](https://www.segmentUI.com)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BroadcastEmptyState\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerDisableUnlink\":\"*\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Empty_State.map"],"mappings":"A,wMAKG,SAAwBc,EAAoB,EAAM,CAAC,GAAK,CAACC,EAAQC,GAAYhB,EAAS,EAAK,EAAQiB,EAAa,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