import{s as f,T as y,c as d,a as g,b as s,t as a,w as A,d as r,v as h,u as l,e as S,F as M,r as V,o as c}from"./app-f0fa1d4d.js";import{_ as w}from"./AdminLayout-196336a1.js";import{_ as E}from"./SpinnerBtn-17822d7e.js";import{_ as I}from"./PageHeader-1622a4ec.js";const P={class:"container p-4 sm:p-6"},Y={class:"space-y-6"},K={class:"grid grid-cols-1 lg:grid-cols-12"},L={class:"lg:col-span-5"},k={class:"lg:col-span-7"},R={class:"card card-body space-y-4"},U={class:"-ml-1 text-lg"},N={class:"mb-2"},B={class:"label"},C={class:"label"},$={value:"",disabled:"",selected:""},j=["value"],x={class:"label"},D={href:"https://app.runwayml.com/",target:"_blank",class:"text-sm"},F={class:"text-primary-500 underline"},T={class:"flex justify-end"},G=Object.assign({layout:w},{__name:"Index",props:["RUNWAYML_API_KEY","models","aiSetting"],setup(p){var m,_,u;const i=p,{trim:v}=f(),o=y({API_KEY:i.RUNWAYML_API_KEY,model:((m=i.aiSetting)==null?void 0:m.model)||"",meta:{credit:((u=(_=i.aiSetting)==null?void 0:_.meta)==null?void 0:u.credit)||1}}),b=()=>{o.post(route("admin.videoai.config.store"))};return(e,n)=>(c(),d("main",P,[g(I,{title:e.trans("Video Ai Settings")},null,8,["title"]),s("div",Y,[s("div",K,[s("div",L,[s("strong",null,a(e.trans("Application Video Api Settings")),1),s("p",null,a(e.trans("Edit Video Ai Api Settings")),1)]),s("div",k,[s("form",{onSubmit:A(b,["prevent"]),class:"space-y-4"},[s("div",R,[s("h6",U,a(e.trans("Runway ML Settings")),1),s("div",N,[s("label",B,a(e.trans("Credit (per second)")),1),r(s("input",{type:"number","onUpdate:modelValue":n[0]||(n[0]=t=>l(o).meta.credit=t),class:"input"},null,512),[[h,l(o).meta.credit]])]),s("div",null,[s("label",C,a(e.trans("Select Model")),1),r(s("select",{class:"select capitalize","onUpdate:modelValue":n[1]||(n[1]=t=>l(o).model=t)},[s("option",$,a(e.trans("Select Model")),1),(c(!0),d(M,null,V(p.models,t=>(c(),d("option",{value:t,key:t},a(l(v)(t)),9,j))),128))],512),[[S,l(o).model]])]),s("div",null,[s("label",x,a(e.trans("Runway ML Api Key")),1),r(s("textarea",{"onUpdate:modelValue":n[2]||(n[2]=t=>l(o).API_KEY=t),class:"textarea",placeholder:"APi key"},null,512),[[h,l(o).API_KEY]]),s("a",D,[s("span",F,a(e.trans("Runway ML API")),1)])])]),s("div",T,[g(E,{processing:l(o).processing,"btn-text":e.trans("Save Changes")},null,8,["processing","btn-text"])])],32)])])])]))}});export{G as default};
