import{r as n,W as d,a as f,b as p,j as e,F as b,J as u,b$ as g,B as x}from"./index-DtyjNqrf.js";import{S as l}from"./SettingsList-m7AYDAw4.js";import"./envs-DFlyG_dH.js";import"./CheckboxField-DKhAwA85.js";import"./InputField-CYbmpJqW.js";import"./NumberField-DVRroIAm.js";import"./SelectField-DfdnxD7O.js";const r="main",h=[r,"frontend","mqtt","serial","availability","ota","advanced","homeassistant"];function T(){const{sendMessage:o}=n.useContext(d),a=f(t=>t.bridgeInfo),[s,m]=n.useState(r),{t:i}=p("settings"),c=n.useCallback(async t=>{s===r?await o("bridge/request/options",{options:t}):await o("bridge/request/options",{options:{[s]:t}})},[o,s]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"alert alert-info alert-soft mb-3",role:"alert",children:[e.jsx(b,{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(t=>e.jsx(x,{className:`tab${s===t?" tab-active":""}`,"aria-current":"page",item:t,onClick:m,children:i(t)},t)),e.jsx("div",{className:"tab-content block h-full bg-base-100 p-3",children:s===r?e.jsx(l,{schema:a.config_schema,data:a.config,set:c,rootOnly:!0}):e.jsx(l,{schema:a.config_schema.properties[s],data:a.config[s],set:c})})]})]})}export{T as default};
