import{a as g,I as h,u as d,r as p,s as m,j as t,dz as f,J as i}from"./index-a36IMXuN.js";import{I as j}from"./InfoAlert-DFbRmsjR.js";import{S as c}from"./SettingsList-CNu-T855.js";import"./envs-CRUy-_iG.js";import"./CheckboxField-CwZ6yoAm.js";import"./InputField-IMyvy6Mz.js";import"./NumberField-RWSAKGZO.js";import"./SelectField-BQBsNhlB.js";const n=({isActive:e})=>e?"tab tab-active":"tab";function q({sourceIdx:e,tab:l}){const o=g(h(s=>s.bridgeInfo[e])),{t:a}=d(["settings","common"]),r=p.useCallback(async s=>{l==="main"?await m(e,"bridge/request/options",{options:s}):await m(e,"bridge/request/options",{options:{[l]:s}})},[e,l]);return t.jsxs(t.Fragment,{children:[t.jsx(j,{children:t.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:"link link-hover",children:a(s=>s.read_the_docs_info,{ns:"common"})})}),t.jsxs("div",{className:"tabs tabs-border",children:[t.jsx(i,{to:`/settings/${e}/settings/main`,className:n,children:a(s=>s.main)}),t.jsx(i,{to:`/settings/${e}/settings/frontend`,className:n,children:a(s=>s.frontend)}),t.jsx(i,{to:`/settings/${e}/settings/mqtt`,className:n,children:a(s=>s.mqtt)}),t.jsx(i,{to:`/settings/${e}/settings/serial`,className:n,children:a(s=>s.serial)}),t.jsx(i,{to:`/settings/${e}/settings/availability`,className:n,children:a(s=>s.availability)}),t.jsx(i,{to:`/settings/${e}/settings/ota`,className:n,children:a(s=>s.ota)}),t.jsx(i,{to:`/settings/${e}/settings/advanced`,className:n,children:a(s=>s.advanced)}),t.jsx(i,{to:`/settings/${e}/settings/homeassistant`,className:n,children:a(s=>s.homeassistant)}),t.jsx(i,{to:`/settings/${e}/settings/health`,className:n,children:a(s=>s.health)}),t.jsx("div",{className:"tab-content block h-full bg-base-100 p-3",children:l==="main"?t.jsx(c,{schema:o.config_schema,data:o.config,set:r,rootOnly:!0,namespace:""}):o.config_schema.properties[l]?t.jsx(c,{schema:o.config_schema.properties[l],data:o.config[l],set:r,namespace:l}):null})]})]})}export{q as default};
