import{r as o,W as d,a as f,b,j as e,F as p,A as u,bQ as g,B as x}from"./index-vDL8KyrI.js";import{S as l}from"./SettingsList-D3Urvwh_.js";import"./CheckboxField-m1WCeVZk.js";import"./InputField-B5sOh_uD.js";import"./SelectField-apZm61cq.js";const n="main",h=[n,"frontend","mqtt","serial","availability","ota","advanced","homeassistant"];function v(){const{sendMessage:r}=o.useContext(d),a=f(s=>s.bridgeInfo),[t,m]=o.useState(n),{t:i}=b("settings"),c=o.useCallback(async s=>{t===n?await r("bridge/request/options",{options:s}):await r("bridge/request/options",{options:{[t]:s}})},[r,t]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"alert alert-info alert-soft mb-3",role:"alert",children:[e.jsx(p,{icon:u,size:"2xl"}),e.jsx("a",{href:g,target:"_blank",rel:"noreferrer",className:"link link-hover",children:i("common:read_the_docs_info")})]}),e.jsxs("div",{className:"tabs tabs-border",children:[h.map(s=>e.jsx(x,{className:`tab${t===s?" tab-active":""}`,"aria-current":"page",item:s,onClick:m,children:i(s)},s)),e.jsx("div",{className:"tab-content block h-full bg-base-100 p-3",children:t===n?e.jsx(l,{schema:a.config_schema,data:a.config,set:c,rootOnly:!0}):e.jsx(l,{schema:a.config_schema.properties[t],data:a.config[t],set:c})})]})]})}export{v as default};
