import{aa as a,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{s as l}from"./machine.-tangy-colts-beg-869.js";import{h as i,a as s,c as E}from"./commonut-tangy-colts-beg-402.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,n){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,n),n)}};const d=a(({helpers:t})=>({states:{components:[E(t),{componentName:t.componentName.mixInput,helperText:e("Write the filename to create the gist"),id:"filename",label:e("Gist Filename"),onChange:"HANDLE_FILE_NAME",path:"filename",placeholder:e("Enter filename"),render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:t.componentName.mixInput,helperText:e("Write the content of the gist"),id:"content",label:e("Content Of The Gist"),onChange:"HANDLE_CONTENT",path:"content",placeholder:e("Enter content of gist"),render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:t.componentName.mixInput,helperText:e("Enter a short description of your gist"),id:"description",label:e("Description"),onChange:"HANDLE_DESCRIPTION",path:"description",placeholder:e("Enter description of gist"),render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:t.componentName.select,helperText:e("Chose the visibility"),id:"is-public-gist",label:e("Make Gist Public"),onChange:"SET_IS_PUBLIC_GIST",options:[{label:e("Yes"),value:"true"},{label:e("No"),value:"false"}],path:"public",render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{IF_ADVANCE_FEATURE_SELECTED:({$:n})=>{var o;return((o=n.getComponent("show-advance-feature"))==null?void 0:o.value)===!0},IF_CONNECTION_SELECTED:({$:n})=>{var o;return c((o=n.getComponent("connection-id"))==null?void 0:o.value)},CONNECTION_ADD_CHANGE:s,HANDLE_CONTENT:i("contentDb"),HANDLE_DESCRIPTION:i("descriptionDb"),HANDLE_FILE_NAME:i("fileName"),SET_CONNECTION:i("connectionId"),SET_IS_PUBLIC_GIST:i("isPublicGist"),ON_MACHINE_LOAD:async({$:n})=>{l(n,[{db:"connectionId",id:"connection-id"},{db:"fileName",id:"filename"},{db:"contentDb",id:"content"},{db:"isPublicGist",id:"is-public-gist"},{db:"descriptionDb",id:"description"}])}}}));export{d as default};
