import{i as l,a4 as w,a2 as b,a5 as d,f as A,P as L,bx as N}from"./app-JmgyQoR0.js";import{F as O}from"./suspense-lwY0NW4i.js";import{F as H}from"./split-mI9ZWkMh.js";import{b as I,a as n,c as x,D as y,h as F,i as T,j as e,l as s,u as P,K as a,E as r,z as u,t as z,F as W,H as q}from"./vue-y3KLWBaS.js";const G={class:"_formRoot"},J=P("i",{class:"ph-key ph-bold ph-lg"},null,-1),Q=P("i",{class:"ph-key ph-bold ph-lg"},null,-1),te=I({__name:"object-storage",setup(X){let S=n(!1),m=n(null),i=n(null),g=n(null),p=n(null),j=n(null),_=n(null),v=n(null),f=n(null),V=n(!1),k=n(!1),B=n(!1),U=n(!0);async function D(){const c=await A("admin/meta");S.value=c.useObjectStorage,m.value=c.objectStorageBaseUrl,i.value=c.objectStorageBucket,g.value=c.objectStoragePrefix,p.value=c.objectStorageEndpoint,j.value=c.objectStorageRegion,_.value=c.objectStoragePort,v.value=c.objectStorageAccessKey,f.value=c.objectStorageSecretKey,V.value=c.objectStorageUseSSL,k.value=c.objectStorageUseProxy,B.value=c.objectStorageSetPublicRead,U.value=c.objectStorageS3ForcePathStyle}function R(){L("admin/update-meta",{useObjectStorage:S.value,objectStorageBaseUrl:m.value,objectStorageBucket:i.value,objectStoragePrefix:g.value,objectStorageEndpoint:p.value,objectStorageRegion:j.value,objectStoragePort:_.value,objectStorageAccessKey:v.value,objectStorageSecretKey:f.value,objectStorageUseSSL:V.value,objectStorageUseProxy:k.value,objectStorageSetPublicRead:B.value,objectStorageS3ForcePathStyle:U.value}).then(()=>{N()})}const M=x(()=>[{asFullButton:!0,icon:"ph-check ph-bold ph-lg",text:l.ts.save,handler:R}]),h=x(()=>[]);return w({title:l.ts.objectStorage,icon:"ph-cloud ph-bold ph-lg"}),(c,t)=>{const E=y("MkPageHeader"),K=y("MkSpacer"),C=y("MkStickyContainer");return F(),T(C,null,{header:e(()=>[s(E,{actions:M.value,tabs:h.value,"display-back-button":!0},null,8,["actions","tabs"])]),default:e(()=>[s(K,{"content-max":700,"margin-min":16,"margin-max":32},{default:e(()=>[s(O,{p:D},{default:e(()=>[P("div",G,[s(b,{modelValue:S.value,"onUpdate:modelValue":t[0]||(t[0]=o=>S.value=o),class:"_formBlock"},{default:e(()=>[a(r(u(l).ts.useObjectStorage),1)]),_:1},8,["modelValue"]),S.value?(F(),z(W,{key:0},[s(d,{modelValue:m.value,"onUpdate:modelValue":t[1]||(t[1]=o=>m.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStorageBaseUrl),1)]),caption:e(()=>[a(r(u(l).ts.objectStorageBaseUrlDesc),1)]),_:1},8,["modelValue"]),s(d,{modelValue:i.value,"onUpdate:modelValue":t[2]||(t[2]=o=>i.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStorageBucket),1)]),caption:e(()=>[a(r(u(l).ts.objectStorageBucketDesc),1)]),_:1},8,["modelValue"]),s(d,{modelValue:g.value,"onUpdate:modelValue":t[3]||(t[3]=o=>g.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStoragePrefix),1)]),caption:e(()=>[a(r(u(l).ts.objectStoragePrefixDesc),1)]),_:1},8,["modelValue"]),s(d,{modelValue:p.value,"onUpdate:modelValue":t[4]||(t[4]=o=>p.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStorageEndpoint),1)]),caption:e(()=>[a(r(u(l).ts.objectStorageEndpointDesc),1)]),_:1},8,["modelValue"]),s(d,{modelValue:j.value,"onUpdate:modelValue":t[5]||(t[5]=o=>j.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStorageRegion),1)]),caption:e(()=>[a(r(u(l).ts.objectStorageRegionDesc),1)]),_:1},8,["modelValue"]),s(H,{"min-width":280},{default:e(()=>[s(d,{modelValue:v.value,"onUpdate:modelValue":t[6]||(t[6]=o=>v.value=o),class:"_formBlock"},{prefix:e(()=>[J]),label:e(()=>[a("Access key")]),_:1},8,["modelValue"]),s(d,{modelValue:f.value,"onUpdate:modelValue":t[7]||(t[7]=o=>f.value=o),type:"password",class:"_formBlock"},{prefix:e(()=>[Q]),label:e(()=>[a("Secret key")]),_:1},8,["modelValue"])]),_:1}),s(b,{modelValue:V.value,"onUpdate:modelValue":t[8]||(t[8]=o=>V.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStorageUseSSL),1)]),caption:e(()=>[a(r(u(l).ts.objectStorageUseSSLDesc),1)]),_:1},8,["modelValue"]),s(b,{modelValue:k.value,"onUpdate:modelValue":t[9]||(t[9]=o=>k.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStorageUseProxy),1)]),caption:e(()=>[a(r(u(l).ts.objectStorageUseProxyDesc),1)]),_:1},8,["modelValue"]),s(b,{modelValue:B.value,"onUpdate:modelValue":t[10]||(t[10]=o=>B.value=o),class:"_formBlock"},{label:e(()=>[a(r(u(l).ts.objectStorageSetPublicRead),1)]),_:1},8,["modelValue"]),s(b,{modelValue:U.value,"onUpdate:modelValue":t[11]||(t[11]=o=>U.value=o),class:"_formBlock"},{label:e(()=>[a("s3ForcePathStyle")]),_:1},8,["modelValue"])],64)):q("",!0)])]),_:1})]),_:1})]),_:1})}}});export{te as default};
