import{g as b,i as j,aH as B,H as C,a as T,j as m,_ as u,h as a,f as z,bG as g}from"./main-634.js";import{F as n}from"./bf-767-388.js";import{E as _}from"./bf-178-233.js";import{S as $}from"./bf-982-242.js";import{a as A}from"./bf-497-246.js";import{C as F}from"./bf-577-275.js";import"./bf-692-111.js";import"./bf-400-72.js";import"./bf-25-81.js";import"./bf-438-114.js";import"./bf-486-243.js";import"./bf-723-244.js";import"./bf-299-245.js";import"./bf-534-247.js";import"./bf-962-248.js";import"./bf-343-249.js";import"./bf-791-250.js";import"./bf-641-107.js";import"./bf-570-251.js";import"./bf-838-80.js";import"./bf-297-103.js";import"./bf-284-252.js";import"./bf-17-106.js";import"./bf-671-253.js";import"./bf-334-254.js";import"./bf-710-385.js";import"./bf-676-386.js";import"./bf-638-271.js";import"./bf-247-269.js";import"./bf-423-273.js";import"./bf-457-387.js";import"./bf-288-389.js";import"./bf-939-390.js";const H={allowMaxSize:"Allow Maximum Upload Size",isItTotalMax:"Total Maximum Size"};function ci(){const{fieldKey:o}=b(),[r,c]=j(B),t=C(r[o]),{css:l}=T(),{allowMaxSize:p,maxSize:S,sizeUnit:M,isItTotalMax:h,multiple:w}=t.config,x=(i,e)=>{t.config[i]=e;const s=z(r,y=>{y[o]=t});c(s);const d=H[i]||i;g({event:`${d}: ${t.lbl||o}`,type:`${i}_changed`,state:{fields:s,fldKey:o}})},f=(i,e)=>{t.config.maxSize=e,t.config.sizeUnit=i;const s=z(r,d=>{d[o]=t});c(s),g({event:`Modify Maximum size to ${e}${i}: ${t.lbl||o}`,type:"modify_maximum_size",state:{fields:s,fldKey:o}})};return m.jsx($,{id:"mxmm-upld-siz-stng",title:u("Allow Maximum Upload Size"),toggleAction:i=>x("allowMaxSize",i.target.checked),toggleChecked:p,className:l(n.fieldSection,n.hover_tip),switching:!0,tip:"By enabling this feature, you will limit the upload size",tipProps:{width:200,icnSize:17},open:p,disable:!p,children:m.jsxs("div",{className:l(n.placeholder),children:[m.jsx(A,{dataTestId:"mxmm-upld-siz",className:l(a.w10,a.mt2,a.mb1,{bd:"var(--b-79-96) !important",brs:"8px !important",p:5}),inputHandler:({unit:i,value:e})=>f(i,e),sizeHandler:({unitKey:i,unitValue:e})=>f(i,e),value:S,unit:M,width:"128px",options:["Bytes","KB","MB","GB"],step:1,max:1024}),w&&m.jsx(F,{id:"ttl-mxmm-siz",className:l(a.mr2,a.ml1,a.mt1,a.fw500),checked:h,title:u("Total Maximum Size"),onChange:i=>x("isItTotalMax",i.target.checked)}),m.jsx(_,{id:"mxmm-upld-siz",type:"maxSize",defaultMsg:"Max Upload Size Exceeded",allowIcons:!1})]})})}export{ci as default};
