import{aa as s,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{h as l,s as m}from"./machine.-tangy-colts-beg-869.js";import{h as E,c as h}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:[h(a),{componentName:a.componentName.select,helperText:t("Select the label to remove it from the email."),id:"label-id",label:t("label"),onChange:"SELECT_LABELS",onRefetch:"REFETCH_LABELS",options:[],path:"label_id",placeholder:t("Select a label"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{componentName:a.componentName.mixInput,helperText:t("Enter the message ID to remove the label."),id:"message-id",label:t("Message ID"),onChange:"HANDLE_MESSAGE_ID",path:"message_id",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0}]},actions:{CONNECTION_ADD_CHANGE:E,IF_CONNECTION_SELECTED:({$:e})=>{var o;return c((o=e.getComponent("connection-id"))==null?void 0:o.value)},ON_MACHINE_LOAD:async({$:e})=>{m(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_LABELS:l("labelId"),REFETCH_LABELS:async({$:e})=>{await i(e)},SET_CONNECTION:async({$:e,e:o})=>{e.setThisComponent(n=>{n.value=o}),e.setDb(n=>{n.connectionId=o}),await i(e)}}}));export{b as default};
