import{T as p,c,a as d,u as e,b as s,t as l,w as m,d as _,f as A,v as S,e as b,o as r,Z as C,q as I}from"./app-13978987.js";import{_ as T}from"./PageHeader-8c638686.js";import{_ as W}from"./AdminLayout-bd13ff9d.js";import{_ as D}from"./SpinnerBtn-cb152833.js";import"./dropdown-45d66330.js";const K={class:"container p-4 sm:p-6"},g={class:"space-y-6"},v={class:"grid grid-cols-1 lg:grid-cols-12"},N={class:"lg:col-span-5"},f={class:"lg:col-span-7"},U={class:"card"},Y={class:"card-body"},h={class:"mb-2"},y={class:"label"},O={value:"public"},F={value:"wasabi"},L={key:0},R={class:"mb-2"},M={class:"label"},B={class:"mb-2"},V={class:"label"},G={class:"mb-2"},P={class:"label"},k={class:"mb-2"},w={class:"label"},$={class:"mb-2"},j={class:"label"},q={class:"mb-2"},Z={class:""},z={layout:W},ss=Object.assign(z,{__name:"Storage",props:["id","FILESYSTEM_DISK","WAS_ACCESS_KEY_ID","SECRET_ACCESS_KEY","WAS_DEFAULT_REGION","WAS_BUCKET","WAS_ENDPOINT","segments","buttons"],setup(E){const i=E,t=p({FILESYSTEM_DISK:i.FILESYSTEM_DISK,WAS_ACCESS_KEY_ID:i.WAS_ACCESS_KEY_ID,SECRET_ACCESS_KEY:i.SECRET_ACCESS_KEY,WAS_DEFAULT_REGION:i.WAS_DEFAULT_REGION,WAS_BUCKET:i.WAS_BUCKET,WAS_ENDPOINT:i.WAS_ENDPOINT});function u(){const a=route("admin.developer-settings.update",i.id);t.put(a,{onSuccess:()=>{I.success(trans("Settings has been updated successfully"))}})}return(a,o)=>(r(),c("main",K,[d(e(C),{title:"Storage"}),d(T,{title:a.trans("Storage Settings"),buttons:E.buttons},null,8,["title","buttons"]),s("div",g,[s("div",v,[s("div",N,[s("strong",null,l(a.trans("Application Storage Settings")),1),s("p",null,l(a.trans("Edit you storage settings for store uploaded files")),1)]),s("div",f,[s("form",{onSubmit:m(u,["prevent"])},[s("div",U,[s("div",Y,[s("div",h,[s("label",y,l(a.trans("Storage Upload Mode")),1),_(s("select",{class:"select","onUpdate:modelValue":o[0]||(o[0]=n=>e(t).FILESYSTEM_DISK=n),name:"FILESYSTEM_DISK",id:"disk-method"},[s("option",O,l(a.trans("Own server (Uploads folder)")),1),s("option",F,l(a.trans("Wasabi")),1)],512),[[A,e(t).FILESYSTEM_DISK]])]),e(t).FILESYSTEM_DISK!="public"?(r(),c("div",L,[s("div",R,[s("label",M,l(a.trans("Wasabi Access Key Id")),1),_(s("input",{type:"text",name:"WAS_ACCESS_KEY_ID",class:"input","onUpdate:modelValue":o[1]||(o[1]=n=>e(t).WAS_ACCESS_KEY_ID=n)},null,512),[[S,e(t).WAS_ACCESS_KEY_ID]])]),s("div",B,[s("label",V,l(a.trans("Wasabi Secret Access Key")),1),_(s("input",{type:"text",name:"SECRET_ACCESS_KEY",class:"input","onUpdate:modelValue":o[2]||(o[2]=n=>e(t).SECRET_ACCESS_KEY=n)},null,512),[[S,e(t).SECRET_ACCESS_KEY]])]),s("div",G,[s("label",P,l(a.trans("Wasabi Default Region")),1),_(s("input",{type:"text",name:"WAS_DEFAULT_REGION",class:"input","onUpdate:modelValue":o[3]||(o[3]=n=>e(t).WAS_DEFAULT_REGION=n)},null,512),[[S,e(t).WAS_DEFAULT_REGION]])]),s("div",k,[s("label",w,l(a.trans("Wasabi Bucket Name")),1),_(s("input",{type:"text",name:"WAS_BUCKET",class:"input","onUpdate:modelValue":o[4]||(o[4]=n=>e(t).WAS_BUCKET=n)},null,512),[[S,e(t).WAS_BUCKET]])]),s("div",$,[s("label",j,l(a.trans("Wasabi Endpoint")),1),_(s("input",{type:"text",name:"WAS_ENDPOINT",class:"input","onUpdate:modelValue":o[5]||(o[5]=n=>e(t).WAS_ENDPOINT=n)},null,512),[[S,e(t).WAS_ENDPOINT]])])])):b("",!0),s("div",q,[s("div",Z,[d(D,{processing:e(t).processing,"btn-text":a.trans("Save Changes")},null,8,["processing","btn-text"])])])])])],32)])])])]))}});export{ss as default};
