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