import{r as n,W as d,a as f,b as p,j as e,F as b,J as u,c2 as g,B as x}from"./index-BeDhuS24.js";import{S as l}from"./SettingsList-wPZC4AYF.js";import"./envs-DFlyG_dH.js";import"./CheckboxField-BhwpagjA.js";import"./InputField-E2g5qJCn.js";import"./NumberField-CH6-YRbT.js";import"./SelectField-CgXiODUe.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};
