import{u as j,b as v,j as e}from"./vendor-BKmmeuxg.js";import{I as o}from"./input-error-LaPr_4wd.js";import{L as f}from"./loading-button-BnTVAMJ7.js";import{C as w}from"./card-D9_SJYq6.js";import{I as n}from"./input-DM0goJrn.js";import{L as c}from"./label-HmIcv5Yx.js";import{S as b,a as y,b as k,c as S,d as m}from"./select-CD9o3HN1.js";import{D as C}from"./layout-DkwBWm5d.js";import"./utils-DxSsnXxD.js";import"./button-BpNwv2aE.js";import"./index-WW_1X1qx.js";import"./sidebar-BYcYxQeZ.js";import"./separator-_3LZ_wAA.js";import"./sheet-DSvHVmaW.js";import"./tooltip-BsX7Z6vz.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./appearance-D2z3xcjR.js";import"./dropdown-menu-DO-po5c1.js";import"./app-BytVvUs_.js";/* empty css            */import"./language-BFZ7KItL.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./scroll-area-C8HGru-R.js";import"./app-logo-CmnEIwal.js";import"./accordion-CNBvFN43.js";import"./route-B4ZMN77y.js";import"./avatar-j28afJTV.js";import"./use-lang-YfV87_zl.js";const N=({storage:l})=>{const{props:p}=j(),{translate:_}=p,{settings:d,input:a,button:g}=_,{data:t,setData:r,post:x,errors:i,processing:h}=v({...l.fields}),u=s=>{s.preventDefault(),x(route("settings.storage.update",{id:l.id}))};return e.jsxs("div",{className:"md:px-3",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold",children:d.storage_settings}),e.jsx("p",{className:"text-gray-500",children:d.storage_settings_description})]}),e.jsx(w,{className:"p-4 sm:p-6",children:e.jsxs("form",{onSubmit:u,className:"space-y-6",children:[e.jsx("h2",{className:"mb-4 text-xl font-semibold",children:d.storage_settings}),e.jsxs("div",{children:[e.jsxs(c,{children:[a.storage_driver," *"]}),e.jsxs(b,{value:t.storage_driver,onValueChange:s=>r("storage_driver",s),children:[e.jsx(y,{children:e.jsx(k,{placeholder:a.select_option})}),e.jsxs(S,{children:[e.jsx(m,{value:"local",children:"Local"}),e.jsx(m,{value:"s3",children:"AWS S3"})]})]}),e.jsx(o,{message:i.storage_driver})]}),t.storage_driver==="s3"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsxs(c,{children:[a.aws_access_key_id," *"]}),e.jsx(n,{name:"aws_access_key_id",value:t.aws_access_key_id||"",onChange:s=>r(s.target.name,s.target.value),placeholder:a.aws_access_key_id_placeholder}),e.jsx(o,{message:i.aws_access_key_id})]}),e.jsxs("div",{children:[e.jsx(c,{children:a.secret_access_key}),e.jsx(n,{type:"password",name:"aws_secret_access_key",value:t.aws_secret_access_key||"",onChange:s=>r(s.target.name,s.target.value),placeholder:a.secret_access_key_placeholder}),e.jsx(o,{message:i.aws_secret_access_key})]}),e.jsxs("div",{children:[e.jsxs(c,{children:[a.aws_default_region," *"]}),e.jsx(n,{name:"aws_default_region",value:t.aws_default_region||"",onChange:s=>r(s.target.name,s.target.value),placeholder:a.aws_default_region_placeholder}),e.jsx(o,{message:i.aws_default_region})]}),e.jsxs("div",{children:[e.jsx(c,{children:a.bucket_name}),e.jsx(n,{name:"aws_bucket",value:t.aws_bucket||"",onChange:s=>r(s.target.name,s.target.value),placeholder:a.bucket_name_placeholder}),e.jsx(o,{message:i.aws_bucket})]})]}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(f,{loading:h,children:g.save_changes})})]})})]})};N.layout=l=>e.jsx(C,{children:l});export{N as default};
