var y=Object.defineProperty,F=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var n=(e,l,s)=>l in e?y(e,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[l]=s,r=(e,l)=>{for(var s in l||(l={}))T.call(l,s)&&n(e,s,l[s]);if(m)for(var s of m(l))_.call(l,s)&&n(e,s,l[s]);return e},f=(e,l)=>F(e,j(l));import{g as z,i as A,aH as h,H as D,a as S,j as c,_ as v,f as k,bG as q}from"./main-634.js";import{F as C}from"./bf-767-388.js";import{o as H}from"./bf-400-72.js";import"./bf-25-81.js";import"./bf-438-114.js";function B(){const{fieldKey:e}=z(),[l,s]=A(h),a=D(l[e]),{css:o}=S(),{allowedFileType:i}=a.config,b=i?i.split(",._RF_,"):[],u=[{label:"Images",value:".xbm,.tif,.pjp,.pjpeg,.svgz,.jpg,.jpeg,.ico,.tiff,.gif,.svg,.bmp,.png,.jfif,.webp,.tif"},{label:"Audios",value:".opus,.flac,.webm,.weba,.wav,.ogg,.m4a,.mp3,.oga,.mid,.amr,.aiff,.wma,.au,.acc,.wpl"},{label:"Videos",value:".ogm,.wmv,.mpg,.webm,.ogv,.mov,.asx,.mpeg,.mp4,.m4v,.avi,.3g2,.3gp,.flv,.mkv,.swf"},{label:"Documents",value:".doc,.docx,.odt,.pdf,.rtf,.tex,.txt,.wks,.wps,.wpd"},{label:"Zip",value:".7z,.arj,.deb,.pkg,.rar,.rpm,.gz,.z,.zip"},{label:"Presentation",value:".key,.odp,.pps,.ppt,.pptx"},{label:"Spreadsheet",value:".ods,.xlr,.xls,.xlsx"},{label:"Databases",value:".csv,.dat,.db,.dbf,.log,.mdb,.sav,.sql,.tar,.sql,.sqlite,.xml"}],g=x=>{const p=x.map(t=>t.value);p.join(",")===""?a.config.allowedFileType="":a.config.allowedFileType=p.join(",._RF_,");const d=k(t=>f(r({},t),{[e]:a}));s(d),q({event:`Changed Allowed File Type: ${a.lbl||e}`,type:"allow_file_type",state:{fldKey:e,fields:d}})},w={msl:{"&.msl-vars":{"--font-size":"13px"},"& .msl-options .msl-option:hover":{bd:"var(--b-79-96)"},"& .msl-options .msl-option:focus":{bd:"var(--b-79-96)"},"& .msl":{bd:"var(--b-79-96) !important"}}};return c.jsx("div",{className:o(C.fieldSection),children:c.jsx(H,{className:`w-10 ${o(w.msl)}`,titleClassName:"title",title:v("Allowed File Type:"),isMultiple:!0,addable:!0,options:u,placeholder:v("Select File Type"),jsonValue:!0,action:g,value:b})})}export{B as default};
