(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[60384],{45156:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var n=t(95155),i=t(31966),r=t(76721),l=t(2125),o=t(73321),a=t(12115),d=t(1550),u=t(89239);function c(){(0,d.si)("Model Providers",{hideActions:!0});let e=(0,o.useRouter)(),[s,t]=(0,a.useState)([]),c=(0,a.useCallback)(()=>{fetch("/api/providers").then(e=>e.json()).then(e=>{Array.isArray(e)&&t(e)}).catch(()=>{})},[]);return(0,a.useEffect)(()=>{c()},[c]),(0,n.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto p-4 sm:p-6",children:[(0,n.jsxs)(u.$,{variant:"ghost",size:"sm",className:"mb-4",onClick:()=>e.push("/settings"),children:[(0,n.jsx)(i.A,{className:"h-4 w-4 mr-1"}),"Settings"]}),(0,n.jsxs)("div",{className:"space-y-1",children:[s.map(s=>(0,n.jsxs)("button",{type:"button",onClick:()=>!s.isBuiltin&&e.push(`/settings/providers/${s.id}`),className:`flex w-full items-center gap-2 rounded-lg px-3 py-3 text-sm transition-colors text-left ${s.isBuiltin?"cursor-default":"hover:bg-muted/50"}`,children:[(0,n.jsx)("span",{className:"font-medium",children:s.name}),s.isBuiltin&&(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:"(built-in)"}),(0,n.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:[s.models.length," model",1!==s.models.length?"s":""]}),!s.isBuiltin&&(0,n.jsx)(r.A,{className:"h-3.5 w-3.5 text-muted-foreground"})]},s.id)),(0,n.jsxs)("button",{type:"button",onClick:()=>e.push("/settings/providers/new"),className:"flex w-full items-center gap-2 rounded-lg px-3 py-3 text-sm text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",children:[(0,n.jsx)(l.A,{className:"h-3.5 w-3.5"}),"Add provider"]})]})]})}},76742:(e,s,t)=>{Promise.resolve().then(t.bind(t,45156))}},e=>{e.O(0,[989,25781,1550,28441,93794,77358],()=>e(e.s=76742)),_N_E=e.O()}]);