{"version":3,"file":"AllSystemsOperational.C1cBgAwf.mjs","names":["useState","_Fragment"],"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":"uMAIG,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,QAAM,cAAY,kBAAgB,YAAU,YAAU,OAAK,QAAM,WAAS,aAAW,eAAa,qBAAmB,uBAAqB,oBAAkB,qBAAmB,iBAAe,EAAW,CAAC,EAAa,GAAiBA,EAAS,aAAa,EAAO,CAAC,EAAa,GAAiBA,EAAS,CAAC,CAAC,EAAE,MAAc,CAAC,IAAM,EAAc,SAAS,CAAC,IAAM,EAAe,CAAC,EAAE,IAAI,IAAM,KAAW,EAAc,EAAQ,eAAe,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