import{D as t,S as i,bE as d,ab as h,o as b,aM as y,a8 as m,a9 as u,I as S,bQ as f,T,bF as k,bH as C,bI as w,bJ as O,bK as v,bL as D,bM as x,R as I,bN as o,bO as E,bP as L,aR as R,H as $,bR as F}from"./index-CNZMR1GT.js";import{F as g}from"./index-3N2OqIV6.js";import{T as a}from"./item_type-CyD6qwPS.js";import{D as N}from"./index-DsSWFirV.js";const M=e=>{const l=b();return t(F,{get w(){var n;return(n=e.w)!=null?n:"100%"},display:"flex",flexDirection:"column",get children(){return[t(i,{get when(){return!e.hideLabel},get children(){return t(d,{get for(){return e.key},display:"flex",alignItems:"center",get children(){return[h(()=>l("settings.".concat(e.key))),t(i,{get when(){return e.flag===g.DEPRECATED},get children(){return t(y,{ml:"$2",as:N,boxSize:"$5",color:"$danger9",verticalAlign:"middle",cursor:"pointer",onClick:()=>{var n;(n=e.onDelete)==null||n.call(e)}})}})]}})}}),t(m,{get fallback(){return t(R,{get children(){return l("settings_other.unknown_type")}})},get children(){return[t(u,{get when(){return[a.String,a.Number].includes(e.type)},get children(){return t(S,{get type(){return e.type===a.Number?"number":""},get id(){return e.key},get value(){return e.value},onInput:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.value)},get readOnly(){return e.flag===g.READONLY}})}}),t(u,{get when(){return e.type===a.Bool},get children(){return t(f,{get id(){return e.key},get checked(){return e.value==="true"},onChange:n=>{var r,c;return(c=e.onChange)==null?void 0:c.call(e,(r=n.currentTarget)!=null&&r.checked?"true":"false")},get readOnly(){return e.flag===g.READONLY}})}}),t(u,{get when(){return e.type===a.Text},get children(){return t(T,{get id(){return e.key},get value(){return e.value},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.value)},get readOnly(){return e.flag===g.READONLY}})}}),t(u,{get when(){return e.type===a.Select},get children(){return t(k,{get id(){return e.key},get value(){return e.value},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n)},get readOnly(){return e.flag===g.READONLY},get children(){return[t(C,{get children(){return[t(w,{get children(){return l("global.choose")}}),t(O,{}),t(v,{})]}}),t(D,{get children(){return t(x,{get children(){return t(I,{get each(){var n;return(n=e.options)==null?void 0:n.split(",")},children:n=>t(o,{value:n,get children(){return[t(E,{get children(){return l("settings.".concat(e.key,"s.").concat(n))}}),t(L,{})]}})})}})}})]}})}})]}}),t($,{get children(){return h(()=>!!e.help)()?l("settings.".concat(e.key,"-tips")):""}})]}})};export{M as I};
