{"version":3,"file":"AllSystemsOperational.BvKW6LPF.mjs","names":["useState","useEffect","startTransition","_jsxs","_jsx","_Fragment","__esmMin","init_npm_react_18_3_1","te","ce","init_jsx_runtime","l","c","p","_e","addPropertyControls","ControlType","init_framer_ChujFWHC","AllSystemsOperational","props","label","statusColor","backgroundColor","textColor","showPulse","font","style","services","errorColor","warningColor","operationalMessage","partialOutageMessage","fullOutageMessage","showServiceDetails","checkInterval","systemStatus","setSystemStatus","downServices","setDownServices","checkServices","failedServices","service","interval","currentStatusColor","currentMessage","isFixedWidth","serviceName","index","init_AllSystemsOperational"],"sources":["https:/framerusercontent.com/modules/Nipv9dvxbuC66M1ezEPC/uX2yWehHXB8msdKU8IZj/AllSystemsOperational.js"],"sourcesContent":["// All Systems Operational Button - A status indicator button showing system health with monitoring capabilities\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function AllSystemsOperational(props){const{label,statusColor,backgroundColor,textColor,showPulse,font,style,services,errorColor,warningColor,operationalMessage,partialOutageMessage,fullOutageMessage,showServiceDetails,checkInterval}=props;const[systemStatus,setSystemStatus]=useState(\"operational\");const[downServices,setDownServices]=useState([]);useEffect(()=>{const checkServices=async()=>{const failedServices=[];for(const service of services){if(!service.isOperational){failedServices.push(service.name);}}startTransition(()=>{setDownServices(failedServices);if(failedServices.length===0){setSystemStatus(\"operational\");}else if(failedServices.length===services.length){setSystemStatus(\"down\");}else{setSystemStatus(\"partial\");}});};checkServices();const interval=setInterval(checkServices,checkInterval*1e3);return()=>clearInterval(interval);},[services,checkInterval]);const currentStatusColor=systemStatus===\"operational\"?statusColor:systemStatus===\"partial\"?warningColor:errorColor;const currentMessage=systemStatus===\"operational\"?operationalMessage:systemStatus===\"partial\"?partialOutageMessage:fullOutageMessage;const isFixedWidth=style?.width===\"100%\";return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",display:\"inline-flex\",flexDirection:\"column\",gap:8,padding:\"12px 20px\",backgroundColor,borderRadius:8,cursor:\"default\",userSelect:\"none\",...isFixedWidth?{}:{width:\"max-content\"}},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:12},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:12,height:12,flexShrink:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",borderRadius:\"50%\",backgroundColor:currentStatusColor}}),showPulse&&systemStatus===\"operational\"&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                                    @keyframes pulse {\n                                        0% {\n                                            transform: scale(1);\n                                            opacity: 1;\n                                        }\n                                        100% {\n                                            transform: scale(2);\n                                            opacity: 0;\n                                        }\n                                    }\n                                `}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",borderRadius:\"50%\",backgroundColor:currentStatusColor,animation:\"pulse 2s ease-out infinite\"}})]})]}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,...font,whiteSpace:\"nowrap\"},children:currentMessage})]}),showServiceDetails&&downServices.length>0&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:4,paddingLeft:24,borderLeft:`2px solid ${currentStatusColor}`,marginLeft:5},children:downServices.map((serviceName,index)=>/*#__PURE__*/_jsxs(\"span\",{style:{color:textColor,...font,fontSize:`calc(${font.fontSize||\"15px\"} * 0.85)`,opacity:.8},children:[\"⚠ \",serviceName]},index))})]});}addPropertyControls(AllSystemsOperational,{operationalMessage:{type:ControlType.String,title:\"Operational Message\",defaultValue:\"All Systems Operational\"},partialOutageMessage:{type:ControlType.String,title:\"Partial Outage Message\",defaultValue:\"Partial Service Outage\"},fullOutageMessage:{type:ControlType.String,title:\"Full Outage Message\",defaultValue:\"Systems Down\"},services:{type:ControlType.Array,title:\"Services\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Service Name\",defaultValue:\"API\"},url:{type:ControlType.String,title:\"URL\",defaultValue:\"https://api.example.com\"},isOperational:{type:ControlType.Boolean,title:\"Operational\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}}},defaultValue:[{name:\"API\",url:\"https://api.example.com\",isOperational:true},{name:\"Database\",url:\"https://db.example.com\",isOperational:true},{name:\"CDN\",url:\"https://cdn.example.com\",isOperational:true}]},showServiceDetails:{type:ControlType.Boolean,title:\"Show Down Services\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},checkInterval:{type:ControlType.Number,title:\"Check Interval\",defaultValue:30,min:5,max:300,step:5,unit:\"s\",displayStepper:true},statusColor:{type:ControlType.Color,title:\"Operational Color\",defaultValue:\"#22CC66\"},warningColor:{type:ControlType.Color,title:\"Warning Color\",defaultValue:\"#FFBB00\"},errorColor:{type:ControlType.Color,title:\"Error Color\",defaultValue:\"#FF5588\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},showPulse:{type:ControlType.Boolean,title:\"Pulse\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AllSystemsOperational\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AllSystemsOperational.map"],"mappings":"A,uMAIG,SAAwBkB,EAA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