|
- import{c as i,g as p}from"./helpers-DemszZkW.js";import{c as s}from"./LabelComponent-ruwgtMfH.js";import{c as d}from"./InputCheckboxRadioComponent-BUByQ9fr.js";import{c as f,I as h}from"./InputSelectComponent-_Ezyl0h8.js";const u=({wrapperClasses:n="form-element",name:r="name",id:e=null,inputType:t="text",isRequired:c=!1,placeholder:o="",label:m="Benutzername",selectOptions:l=[]})=>{const a=i("div",n.split(" "));return(!e||e.length===0)&&(e=r),(t==="checkbox"||t==="radio")&&a.appendChild(d({type:t,isRequired:c,name:r,id:e})),a.appendChild(s({forAttribute:e,isRequired:c,text:m})),t==="select"&&a.appendChild(f({placeholder:o,isRequired:c,name:r,id:e,options:l.length>0?l:h})),["checkbox","radio","select"].indexOf(t)===-1&&a.appendChild(p({placeholder:o,isRequired:c,name:r,id:e,type:t})),a};export{u as c};
|