import{d as x,an as k,ap as E,r as F,o as t,f as i,D as y,x as r,z as o,J as W,a3 as S,g as f,A as c,t as n,S as l,b as p,y as v,W as m,_ as q}from"./index-dyx4v2bZ.js";const C={class:"WdsFieldWrapper colorTransformer"},$={class:"temporaryMissingBar"},M={key:0,class:"WdsFieldWrapper__title"},z={key:0,class:"WdsFieldWrapper__title__label"},I={key:0,class:"WdsFieldWrapper__title__label__unit"},N={class:"WdsFieldWrapper__slot"},V={key:1,class:"WdsFieldWrapper__error"},_={key:2,class:"WdsFieldWrapper__hint"},A=x({__name:"WdsFieldWrapper",props:k({label:{type:String,required:!1,default:void 0},unit:{type:String,required:!1,default:void 0},hint:{type:String,required:!1,default:void 0},error:{type:String,required:!1,default:void 0},isExpansible:{type:Boolean,required:!1,default:!1},isBindingButtonShown:{type:Boolean,required:!1,default:!1},helpButton:{type:[String,Boolean],required:!1,default:void 0}},{isBindingEnabled:{type:Boolean,required:!1,default:!1},isBindingEnabledModifiers:{}}),emits:k({helpClick:()=>!0,expand:()=>!0,shrink:()=>!0},["update:isBindingEnabled"]),setup(e,{emit:g}){const s=E(e,"isBindingEnabled"),B=g,d=F(!1);function b(){B("expand"),d.value=!0}const h={desc:"OK",fn:()=>{d.value=!1,B("shrink")}};return(u,a)=>(t(),i("div",C,[d.value?(t(),i(y,{key:0},[r(S,{actions:[h],description:e.hint,title:e.label},{default:o(()=>[W(u.$slots,"default",{},void 0,!0)]),_:3},8,["actions","description","title"]),f("div",$,[a[2]||(a[2]=c(" Field ")),f("strong",null,n(e.label),1),a[3]||(a[3]=c(" is open in a new window. "))])],64)):(t(),i(y,{key:1},[!d.value&&(e.label||e.helpButton)?(t(),i("div",M,[e.label?(t(),i("label",z,[c(n(e.label),1),e.unit?(t(),i("span",I," : "+n(e.unit),1)):l("",!0)])):l("",!0),e.isExpansible?(t(),p(m,{key:1,variant:"neutral",size:"smallIcon","data-writer-tooltip":"Expand",onClick:b},{default:o(()=>[r(v,{name:"expand"})]),_:1})):l("",!0),e.helpButton?(t(),p(m,{key:2,variant:"neutral",size:"smallIcon","data-writer-tooltip":typeof e.helpButton=="string"?e.helpButton:void 0,onClick:a[0]||(a[0]=w=>u.$emit("helpClick"))},{default:o(()=>[r(v,{name:"circle-question-mark"})]),_:1},8,["data-writer-tooltip"])):l("",!0),e.isBindingButtonShown?(t(),p(m,{key:3,variant:"neutral",size:"smallIcon","data-writer-tooltip-placement":"left","data-writer-tooltip":s.value?"Unbind from variable":"Bind to a variable",onClick:a[1]||(a[1]=w=>s.value=!s.value)},{default:o(()=>[r(v,{name:s.value?"wds-at-sign-slash":"at-sign"},null,8,["name"])]),_:1},8,["data-writer-tooltip"])):l("",!0)])):l("",!0),f("div",N,[W(u.$slots,"default",{},void 0,!0)]),e.error?(t(),i("p",V,n(e.error),1)):l("",!0),e.hint?(t(),i("p",_,n(e.hint),1)):l("",!0)],64))]))}}),O=q(A,[["__scopeId","data-v-15f0885c"]]);export{O as W};
