import{b as x,r,s as g,H as l,bK as m,bL as c,j as e,B as h,bM as b,bN as j,d as f,Q as p,J as N,bO as S,bP as T}from"./index-vDL8KyrI.js";import{I as d}from"./InputField-B5sOh_uD.js";import{S as A}from"./SelectField-apZm61cq.js";const a=g;function C(){const{t:s}=x(["settings","navbar"]),[n,u]=r.useState(a.get(l,"devices")),[i,v]=r.useState(a.get(m,254)),[o,E]=r.useState(a.get(c,4));r.useEffect(()=>{a.set(l,n)},[n]),r.useEffect(()=>{a.set(m,i)},[i]),r.useEffect(()=>{a.set(c,o)},[o]);const _=()=>{a.remove(f),a.remove(p),a.remove(N),a.remove(S),a.remove(l),a.remove(m),a.remove(c),a.remove(T),window.location.reload()};return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"alert alert-info alert-vertical sm:alert-horizontal mb-3",children:[s("frontend_notice"),e.jsx("div",{children:e.jsx(h,{className:"btn btn-sm btn-error",onClick:_,children:s("reset_all")})})]}),e.jsxs("div",{children:[s("language")," ",e.jsx(b,{useExistingChildren:!0})]}),e.jsxs("div",{children:[s("theme")," ",e.jsx(j,{useExistingChildren:!0})]}),e.jsx("div",{children:e.jsxs(A,{name:"homepage",label:s("homepage"),onChange:t=>!t.target.validationMessage&&u(t.target.value),value:n,required:!0,children:[e.jsx("option",{value:"devices",children:s("navbar:devices")}),e.jsx("option",{value:"dashboard",children:s("navbar:dashboard")})]})}),e.jsx("div",{children:e.jsx(d,{type:"number",name:"permit_join_time",label:s("permit_join_time"),min:10,max:254,required:!0,value:i,onChange:t=>!t.target.validationMessage&&!!t.target.value&&v(t.target.valueAsNumber)})}),e.jsx("div",{children:e.jsx(d,{type:"number",name:"max_on_screen_notifications",label:s("max_on_screen_notifications"),min:1,max:5,required:!0,value:o,onChange:t=>!t.target.validationMessage&&!!t.target.value&&E(t.target.valueAsNumber)})})]})}export{C as default};
