import{d as t,aE as e,a as o,h as i,o as n,X as s,Y as r,C as a,$ as l,c as m,W as p,u as c,a4 as d,a0 as u}from"./index.9313841a.js";import{eV as f}from"./Hvac.5d33635f.js";import{E as g}from"./EditOutlined.91c20b47.js";import{B as y}from"./button.b2af5e57.js";import"./T3Data.889a220d.js";import"./_commonjsHelpers.a5007c1f.js";import"./RefConstant.60485b5b.js";import"./common.356e5c35.js";import"./index.b9a1e371.js";import"./AntdIcon.111f44e5.js";import"./api.c096d0cb.js";import"./index.d11c4764.js";import"./plugin-vue_export-helper.21dcd24c.js";import"./index.0b39d519.js";import"./QTooltip.fa4abc75.js";import"./position-engine.57eefbc7.js";const j=t({__name:"ObjectType2",props:{item:{},showArrows:{type:Boolean}},emits:["autoManualToggle","objectClicked","changeValue","updateWeldModel"],setup(t,{emit:j}){const v=t,E=j;function b(t){t.stopPropagation(),alert("Icon edit clicked")}function k(t){t.stopPropagation(),alert("Antd button clicked")}function C(){E("objectClicked")}return e.Debug("ObjectType2 props",v.item),o((()=>{var t;return f.getEntryRange(null==(t=v.item)?void 0:t.t3Entry)})),o((()=>{var t;if(!v.item.t3Entry)return"";const o=f.getEntryRange(v.item.t3Entry);if(e.Debug("= Ot range,t3e",o,v.item.t3Entry),"description"===v.item.settings.t3EntryDisplayField){const e=v.item.t3Entry.description||"",i=v.item.t3Entry.value||"";let n="";if(v.item.t3Entry.range>100){const e=null==(t=o.options)?void 0:t.find((t=>t.value===v.item.t3Entry.value));n=(null==e?void 0:e.name)||""}else 1===v.item.t3Entry.digital_analog?n=(i||"")+" "+((null==o?void 0:o.unit)||""):0===v.item.t3Entry.digital_analog&&(n=v.item.t3Entry.control?(null==o?void 0:o.on)||"":(null==o?void 0:o.off)||"");return e+" "+n}return v.item.t3Entry[v.item.settings.t3EntryDisplayField]||""})),o((()=>{var t,e;const o=v.item;return["Gauge","Dial"].includes(o.type||"")?"Gauge"===o.type?null==(t=o.settings.colors)?void 0:t.map((t=>[t.offset/100,t.color])):null==(e=o.settings.colors)?void 0:e.map(((t,e)=>{var i;return{from:e?null==(i=o.settings.colors)?void 0:i[e-1].offset:0,to:t.offset,color:[t.color]}})):null})),i(null),n((()=>{e.Debug("Component mounted with props:",{item:v.item,showArrows:v.showArrows,title:v.item.title,type:v.item.type,settings:v.item.settings})})),(t,e)=>t.item.title?(s(),r("div",{key:0,onClick:C},[a(l(t.item.title)+" ",1),m(c(g),{onClick:p(b,["stop"]),class:"edit-icon"}),m(c(y),{type:"primary",onClick:p(k,["stop"])},{default:d((()=>[...e[0]||(e[0]=[a("Antd Button",-1)])])),_:1})])):u("",!0)}});export{j as default};
