import{aa as s,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{h as l,s as E}from"./machine.-tangy-colts-beg-869.js";import{h as d,c as m}from"./commonut-tangy-colts-beg-6742.js";import{f as i}from"./machineh-tangy-colts-beg-771.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(a,e){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,e),e)}};const b=s(({helpers:a})=>({states:{components:[m(a),{componentName:a.componentName.select,helperText:o("Select the label to add it on the email."),id:"label-id",label:o("label"),onChange:"SELECT_LABEL",onRefetch:"REFETCH_LABEL",options:[],path:"label_id",placeholder:o("Select a label"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{componentName:a.componentName.mixInput,helperText:o("Enter the message ID, for the label."),id:"message-id",label:o("Message ID"),onChange:"HANDLE_MESSAGE_ID",path:"message_id",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0}]},actions:{CONNECTION_ADD_CHANGE:d,IF_CONNECTION_SELECTED:({$:e})=>{var t;return c((t=e.getComponent("connection-id"))==null?void 0:t.value)},ON_MACHINE_LOAD:async({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"labelId",id:"label-id"},{db:"messageId",id:"message-id"}]),await i(e)},HANDLE_MESSAGE_ID:l("messageId"),SELECT_LABEL:l("labelId"),REFETCH_LABEL:async({$:e})=>{await i(e)},SET_CONNECTION:async({$:e,e:t})=>{e.setThisComponent(n=>{n.value=t}),e.setDb(n=>{n.connectionId=t}),await i(e)}}}));export{b as default};
