import{r as i,u,j as e,aD as p,aR as c,$ as h,i as m}from"../index.js";function g(){const[n,r]=i.useState(!1),[l,o]=i.useState(!0),{t:a}=u(),d=async t=>{o(t),r(!0);try{c.updateSettings({autoSubmitSttInput:t})}catch(s){console.error("Failed to update appearance settings:",s),o(!t)}r(!1)};return i.useEffect(()=>{function t(){const s=c.getSettings();o(s.autoSubmitSttInput??!0)}t()},[]),e.jsx("div",{className:"my-4",children:e.jsx(p,{size:"md",variant:"horizontal",enabled:l,onChange:d,disabled:n,label:a("customization.chat.auto_submit.title"),description:a("customization.chat.auto_submit.description")})})}function S(){const[n,r]=i.useState(!1),[l,o]=i.useState(!1),{t:a}=u(),d=async t=>{o(t),r(!0);try{c.updateSettings({autoPlayAssistantTtsResponse:t})}catch(s){console.error("Failed to update appearance settings:",s),o(!t)}r(!1)};return i.useEffect(()=>{function t(){const s=c.getSettings();o(s.autoPlayAssistantTtsResponse??!1)}t()},[]),e.jsx("div",{className:"my-4",children:e.jsx(p,{size:"md",variant:"horizontal",enabled:l,onChange:d,disabled:n,label:a("customization.chat.auto_speak.title"),description:a("customization.chat.auto_speak.description")})})}function f(){const{t:n}=u(),[r,l]=i.useState(!1),[o,a]=i.useState(c.get("enableSpellCheck")),d=async t=>{a(t),l(!0);try{c.set("enableSpellCheck",t)}catch(s){console.error("Failed to update appearance settings:",s),a(!t)}l(!1)};return e.jsx("div",{className:"my-4",children:e.jsx(p,{size:"md",variant:"horizontal",enabled:o,onChange:d,disabled:r,label:n("customization.chat.spellcheck.title"),description:n("customization.chat.spellcheck.description")})})}function b(){const{t:n}=u(),[r,l]=i.useState(!1),[o,a]=i.useState(!1),d=async t=>{a(t),l(!0);try{c.updateSettings({showScrollbar:t})}catch(s){console.error("Failed to update appearance settings:",s),a(!t)}l(!1)};return i.useEffect(()=>{function t(){const s=c.getSettings();a(s.showScrollbar)}t()},[]),e.jsx("div",{className:"my-4",children:e.jsx(p,{size:"md",variant:"horizontal",enabled:o,onChange:d,disabled:r,label:n("customization.items.show-scrollbar.title"),description:n("customization.items.show-scrollbar.description")})})}function x(){const{t:n}=u(),[r,l]=i.useState(!1),[o,a]=i.useState(!1),d=async t=>{a(t),l(!0);try{c.updateSettings({renderHTML:t})}catch(s){console.error("Failed to update appearance settings:",s),a(!t)}l(!1)};return i.useEffect(()=>{function t(){const s=c.getSettings();a(s.renderHTML)}t()},[]),e.jsx("div",{className:"my-4",children:e.jsx(p,{size:"md",variant:"horizontal",enabled:o,onChange:d,disabled:r,label:n("customization.items.render-html.title"),description:n("customization.items.render-html.description")})})}function y(){const{t:n}=u();return e.jsxs("div",{className:"w-screen h-screen overflow-hidden bg-theme-bg-container flex",children:[e.jsx(h,{}),e.jsx("div",{style:{height:m?"100%":"calc(100% - 32px)"},className:"relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-theme-bg-secondary w-full h-full overflow-y-scroll p-4 md:p-0",children:e.jsxs("div",{className:"flex flex-col w-full px-1 md:pl-6 md:pr-[86px] md:py-6 py-16",children:[e.jsxs("div",{className:"w-full flex flex-col gap-y-1 pb-6 border-white light:border-theme-sidebar-border border-b-2 border-opacity-10",children:[e.jsx("div",{className:"items-center",children:e.jsx("p",{className:"text-lg leading-6 font-bold text-white",children:n("customization.chat.title")})}),e.jsx("p",{className:"text-xs leading-[18px] font-base text-white text-opacity-60",children:n("customization.chat.description")})]}),e.jsx(g,{}),e.jsx(S,{}),e.jsx(f,{}),e.jsx(b,{}),e.jsx(x,{})]})})]})}export{y as default};
