import{aa as o,ab as r}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as n,s as m}from"./machine.-tangy-colts-beg-869.js";import{h as l,c as p}from"./commons.-tangy-colts-beg-737.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,a){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,a),a)}};const u=o(({helpers:t})=>({states:{components:[p(t),{componentName:t.componentName.mixInput,helperText:e("Enter Email address of the profile to associate with the event."),id:"email-id",label:e("Email"),onChange:"SET_EMAIL",path:"data.attributes.profile.data.attributes.email",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,helperText:e("Enter Name of the metric/event to track."),id:"metric-name",label:e("Metric Name"),onChange:"SET_METRIC_NAME",path:"data.attributes.metric.data.attributes.name",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{addItemButtonLabel:e("Add Properties"),componentName:t.componentName.repeaterField,fieldsMetaData:[{componentName:t.componentName.mixInput,helperText:e("Property key name."),label:e("Key"),name:"key",required:!0,value:[],wrapperClassName:"w-100"},{componentName:t.componentName.mixInput,helperText:e("Property value."),label:e("Value"),name:"value",required:!0,value:[],wrapperClassName:"w-100"}],helperText:e("Add custom properties to the event. Properties must required for created events."),id:"properties-list",inputGroupProps:{label:e("Properties #{COUNT}")},label:e("Properties"),onChange:"ON_PROPERTIES_CHANGE",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:t.componentName.mixInput,helperText:e("Enter Timestamp of the event (ISO 8601 format), e.g. 2025-11-08T00:00:00+00:00."),id:"time-id",label:e("Time"),onChange:"SET_TIME",path:"data.attributes.time",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:t.componentName.mixInput,helperText:e("Enter Numeric value associated with the event."),id:"value-id",label:e("Value"),onChange:"SET_VALUE",path:"data.attributes.value",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{CONNECTION_ADD_CHANGE:l,IF_CONNECTION_SELECTED:({$:a})=>{var i;return r((i=a.getComponent("connection-id"))==null?void 0:i.value)},ON_PROPERTIES_CHANGE:n("properties"),SET_CONNECTION:n("connectionId"),SET_EMAIL:n("email"),SET_METRIC_NAME:n("metric"),SET_TIME:n("time"),SET_VALUE:n("value"),ON_MACHINE_LOAD:async({$:a})=>{m(a,[{db:"connectionId",id:"connection-id"},{db:"email",id:"email-id"},{db:"metric",id:"metric-name"},{db:"properties",id:"properties-list"},{db:"time",id:"time-id"},{db:"value",id:"value-id"}])}}}));export{u as default};
