const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/local-CrGAEOEt.js","assets/rolldown-runtime-C5c2KzVm.js","assets/lucide-C4oWPzu4.js","assets/label-D4DLXoEs.js","assets/dist-CImBN8k_.js","assets/bundle-mjs-C4g7ASB5.js","assets/react-dom-DA2kpOcl.js","assets/utils-Bs-0X7qI.js","assets/useMutation-YNiikd7W.js","assets/dist-Cw-z5Xb0.js","assets/shared-DtQmrU00.js","assets/form-CVrsvflM.js","assets/dist-C-9OzCvQ.js","assets/status-codes.constant-BV2w9Io6.js","assets/console-BA0IzvI-.js","assets/useInfiniteQuery-D-mVtfs7.js","assets/payconfig.constant-DWaejGty.js","assets/permission-guard-C-WT75tf.js","assets/button-B-NlEi4h.js","assets/card-BgiZuEPo.js","assets/input-DcxjhZaU.js","assets/textarea-BJ2TI6HZ.js","assets/oss-B1VPWoN2.js","assets/zod-C00kRz21.js","assets/schemas-DQQutaZ2.js","assets/cos-CQQezZDn.js"])))=>i.map(i=>d[i]);
import{r as e,s as t}from"./rolldown-runtime-C5c2KzVm.js";import{$P as n,r}from"./lucide-C4oWPzu4.js";import{p as i}from"./utils-Bs-0X7qI.js";import{r as a}from"./bundle-mjs-C4g7ASB5.js";import{i as o,n as s,r as c,t as l}from"./tabs-DFTSpqgq.js";import{w as u}from"./console-BA0IzvI-.js";import{t as d}from"./permission-guard-C-WT75tf.js";import{t as f}from"./page-container-5wXiFE1n.js";var p=e({default:()=>b}),m=i(),h=t(n(),1),g=a(),_=(0,h.lazy)(async()=>r(()=>import(`./local-CrGAEOEt.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),v=(0,h.lazy)(async()=>r(()=>import(`./oss-B1VPWoN2.js`),__vite__mapDeps([22,1,2,23,11,3,4,5,6,7,12,24,8,9,10,13,14,15,16,17,18,19,20,21]))),y=(0,h.lazy)(async()=>r(()=>import(`./cos-CQQezZDn.js`),__vite__mapDeps([25,1,2,23,11,3,4,5,6,7,12,24,8,9,10,14,15,16,18,19,20,21]))),b=()=>{let e=(0,m.c)(24),[t,n]=(0,h.useState)(``),{data:r}=u(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>{n(e)},e[0]=i):i=e[0];let a=i,o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o={local:`本地存储`,oss:`阿里云OSS`,cos:`腾讯云COS`,kodo:`七牛云KODO`},e[1]=o):o=e[1];let p=o,b;e[2]===r?b=e[3]:(b=r?.map(e=>({name:e.storageType,label:p[e.storageType]??e.storageType}))??[],e[2]=r,e[3]=b);let C=b,w,T;e[4]===r?(w=e[5],T=e[6]):(w=()=>{if(!r||r.length===0)return;let e=r.find(x),t=r[0]?.storageType??``,i=e?.storageType??t;n(e=>e&&r.some(t=>t.storageType===e)?e:i)},T=[r],e[4]=r,e[5]=w,e[6]=T),(0,h.useEffect)(w,T);let E;e[7]!==t||e[8]!==r?(E=r?.find(e=>e.storageType===t)?.id,e[7]=t,e[8]=r,e[9]=E):E=e[9];let D=E,O;bb0:switch(t){case`oss`:O=v;break bb0;case`cos`:O=y;break bb0;default:O=_}let k=O,A;e[10]===C?A=e[11]:(A=C.map(S),e[10]=C,e[11]=A);let j;e[12]===A?j=e[13]:(j=(0,g.jsx)(c,{children:A}),e[12]=A,e[13]=j);let M;e[14]!==k||e[15]!==D?(M=(0,g.jsx)(d,{permissions:`system-storage-config:detail`,children:(0,g.jsx)(k,{configId:D})}),e[14]=k,e[15]=D,e[16]=M):M=e[16];let N;e[17]!==t||e[18]!==M?(N=(0,g.jsx)(s,{value:t,className:`md:max-w-full lg:max-w-md`,children:M}),e[17]=t,e[18]=M,e[19]=N):N=e[19];let P;return e[20]!==t||e[21]!==N||e[22]!==j?(P=(0,g.jsx)(f,{children:(0,g.jsx)(d,{permissions:`system-storage-config:list`,children:(0,g.jsxs)(l,{value:t,onValueChange:a,className:`space-y-4`,children:[j,N]})})}),e[20]=t,e[21]=N,e[22]=j,e[23]=P):P=e[23],P};function x(e){return e.isActive}function S(e){return(0,g.jsx)(o,{value:e.name,children:e.label},e.name)}export{p as n,b as t};