import{d as b,k as y,m as I,T as P,r as E,c as r,o as l,a as e,t as s,x as C,b as _,w as N,h as S,F as u,g as v,n as x,l as T,v as k,u as d}from"./app-Do7K7VDV.js";import{_ as K}from"./SpinnerBtn-C-rqKjUt.js";import{_ as V}from"./AdminLayout-DeT_GLTC.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const w={class:"space-y-6"},D={class:"grid grid-cols-1 lg:grid-cols-12"},G={class:"lg:col-span-6"},M={class:"lg:col-span-6"},Y={class:"card card-body space-y-4"},B={class:"space-y-4"},O={class:"flex gap-2"},$=["onClick"],j={class:"mb-2"},F=["onUpdate:modelValue"],U={class:"mt-2 flex justify-end"},z=b({layout:V}),Z=Object.assign(z,{__name:"AiApi",props:["id","aiProviders"],setup(m){const t=m,p=["General","AI Tools"],c=y(p[0]),f=I(()=>c.value==="General"?{OPENAI_API_KEY:t.aiProviders.OPENAI_API_KEY,GEMINI_API_KEY:t.aiProviders.GEMINI_API_KEY}:t.aiProviders),a=P({...t.aiProviders});function g(){a.put(route("admin.developer-settings.update",t.id))}return(o,L)=>{const h=E("CardDescription");return l(),r("div",w,[e("div",D,[e("div",G,[e("strong",null,s(o.trans("Application Ai Api Settings")),1),e("p",null,s(o.trans("Edit you Ai Api Settings")),1)]),e("div",M,[e("form",{onSubmit:C(g,["prevent"]),class:"space-y-4"},[e("div",Y,[e("div",null,[e("h6",null,s(o.trans("AI API Key Settings")),1),_(h,null,{default:N(()=>[S(s(o.trans("Edit your AI Api Settings for each provider to enable it")),1)]),_:1})]),e("div",B,[e("div",O,[(l(),r(u,null,v(p,i=>e("button",{class:x(["btn",c.value===i?"btn-info":"btn-secondary"]),type:"button",key:i,onClick:n=>c.value=i},s(i),11,$)),64))]),(l(!0),r(u,null,v(f.value,(i,n)=>(l(),r("div",{key:n},[e("label",j,s(n.replaceAll("_"," ")),1),T(e("input",{type:"text",class:"input","onUpdate:modelValue":A=>d(a)[n]=A,placeholder:"Enter api key to enable this provider"},null,8,F),[[k,d(a)[n]]])]))),128))]),e("div",U,[_(K,{processing:d(a).processing,"btn-text":o.trans("Save Changes")},null,8,["processing","btn-text"])])])],32)])])])}}});export{Z as default};
