"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[569],{8759:(e,n,t)=>{t.r(n),t.d(n,{default:()=>w});var a=t(821),l={class:"card mb-2"},s={class:"card-body"},i={class:"mb-3"},u=["for"],r=["name","id","onUpdate:modelValue"],m={class:"mb-3"},o=["for"],c=["name","id","onUpdate:modelValue","rows"],d=["onClick"],p=(0,a._)("i",{class:"fa fa-times"},null,-1),f=(0,a._)("hr",null,null,-1),b={class:"mt-2 text-center"},v=(0,a._)("i",{class:"fa fa-plus"},null,-1);const _={name:"SettingsParameters",props:{initialItems:Array,inputName:String},data:function(){return{items:this.initialItems||[]}},methods:{addItem:function(){this.items.push({name:"",value:""})},removeItem:function(e){this.items.splice(e,1)}}};const w=(0,t(3744).Z)(_,[["render",function(e,n,t,_,w,h){return(0,a.wg)(),(0,a.iD)("div",null,[(0,a._)("div",l,[(0,a._)("div",s,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.items,(function(n,l){return(0,a.wg)(),(0,a.iD)("div",null,[(0,a._)("div",i,[(0,a._)("label",{for:t.inputName+"["+l+"][name]",class:"control-label"},(0,a.zw)(e.trans("labels.name")),9,u),(0,a.wy)((0,a._)("input",{name:t.inputName+"["+l+"][name]",id:t.inputName+"["+l+"][name]","onUpdate:modelValue":function(e){return n.name=e},type:"text",class:"form-control"},null,8,r),[[a.nr,n.name]])]),(0,a._)("div",m,[(0,a._)("label",{for:t.inputName+"["+l+"][value]",class:"control-label"},(0,a.zw)(e.trans("labels.the_value")),9,o),(0,a.wy)((0,a._)("textarea",{name:t.inputName+"["+l+"][value]",id:t.inputName+"["+l+"][value]","onUpdate:modelValue":function(e){return n.value=e},class:"form-control",rows:(n.value.match(new RegExp("\n","g"))||[]).length+2},"\n                        ",8,c),[[a.nr,n.value]])]),(0,a._)("button",{class:"btn btn-sm btn-danger",onClick:(0,a.iM)((function(e){return h.removeItem(l)}),["prevent"])},[p,(0,a.Uk)(" "+(0,a.zw)(e.trans("main.delete")),1)],8,d),f])})),256)),(0,a._)("div",b,[(0,a._)("button",{class:"btn btn-sm btn-success",onClick:n[0]||(n[0]=(0,a.iM)((function(){return h.addItem&&h.addItem.apply(h,arguments)}),["prevent"]))},[v,(0,a.Uk)(" "+(0,a.zw)(e.trans("main.add")),1)])])])])])}]])}}]);