import{c as F,a as E,j as a,_ as M,F as I,z as L}from"./main-tangy-colts-beg.js";import{q as D}from"./_applist-tangy-colts-beg-36.js";import{M as o}from"./index-tangy-colts-beg-123.js";import{S as y}from"./index-tangy-colts-beg-430.js";import{S as z}from"./index-tangy-colts-beg-137.js";import"./index-tangy-colts-beg-650.js";import{A as R}from"./appheade-tangy-colts-beg-249.js";import"./lodash-tangy-colts-beg-516.js";import"./index-tangy-colts-beg-837.js";import"./index-tangy-colts-beg-131.js";import"./index-tangy-colts-beg-472.js";import"./index-tangy-colts-beg-4.js";import"./usedebou-tangy-colts-beg-721.js";import"./import-tangy-colts-beg-35.js";import"./index-tangy-colts-beg-987.js";import"./usebreak-tangy-colts-beg-501.js";import"./index-tangy-colts-beg-596.js";import"./index-tangy-colts-beg-216.js";import"./utilscss-tangy-colts-beg-788.js";import"./index-tangy-colts-beg-827.js";import"./index-tangy-colts-beg-73.js";import"./index-tangy-colts-beg-900.js";import"./index-tangy-colts-beg-916.js";import"./exporthe-tangy-colts-beg-840.js";import"./index-tangy-colts-beg-660.js";import"./dropdown-tangy-colts-beg-845.js";import"./index.es-tangy-colts-beg-4.js";import"./paginati-tangy-colts-beg-302.js";import"./index-tangy-colts-beg-26.js";import"./index-tangy-colts-beg-245.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(s,e){return this.cache.has(s)?this.cache.get(s):(this.cache.set(s,e),e)}};function ne({nodeId:s}){var c,l,h,m,p,n,u,v,d,C,b,_,f,g,S,x;const[e,V]=F(D(s)),r=(t,j)=>{V(A=>L(A,i=>{var T;i.states||(i.states={components:[]}),(T=i.states)!=null&&T.csv||(i.states.csv={contains_headers:!1,csv_header:[],csv_mode:"file",csv_source:"file",delimiter:"comma",delimiter_character:[],file_path:[]}),i.states.csv[t]=j}))};return E(I,{children:[a(R,{appColor:e.appColor,appIcon:e.appIcon,appTitle:e.appTitle,machineLabel:e.machineLabel}),a(y,{label:"CSV source",onChange:t=>r("csv_source",t),options:[{label:a("span",{children:"Get from file"}),value:"file"}],placeholder:"CSV Source",style:{width:"100%"},value:((l=(c=e==null?void 0:e.states)==null?void 0:c.csv)==null?void 0:l.csv_source)||"file"}),a(z,{checked:((m=(h=e==null?void 0:e.states)==null?void 0:h.csv)==null?void 0:m.contains_headers)||!1,direction:"horizontal",helperText:"Enable this if the first row of your CSV contains column headers instead of data.",label:M("CSV contains headers"),onChange:t=>r("contains_headers",t)}),((n=(p=e==null?void 0:e.states)==null?void 0:p.csv)==null?void 0:n.contains_headers)===!0&&a(o,{helperText:"Enter the column headers as a delimiter-separated list (for example: firstname,lastname,address) to display them correctly in the output. If left empty, column numbers will be shown instead.",label:"CSV headers (recommended)",onChange:t=>r("csv_header",t),value:(v=(u=e==null?void 0:e.states)==null?void 0:u.csv)==null?void 0:v.csv_header}),a(y,{className:"mb-1",helperText:"Choose the character that separates values in your CSV. Most CSV files use commas.",label:"Delimiter",onChange:t=>r("delimiter",t),options:[{label:a("span",{children:"Comma"}),value:"comma"},{label:a("span",{children:"Tab"}),value:"tab"},{label:a("span",{children:"Other"}),value:"other"}],placeholder:"Delimiter",style:{width:"100%"},value:((C=(d=e==null?void 0:e.states)==null?void 0:d.csv)==null?void 0:C.delimiter)||"comma"}),((_=(b=e==null?void 0:e.states)==null?void 0:b.csv)==null?void 0:_.delimiter)==="other"&&a(o,{helperText:"Enter the character used to separate values in your CSV. For example, if your CSV uses semicolons, enter ; here.",label:"Delimiter character",onChange:t=>r("delimiter_character",t),value:(g=(f=e==null?void 0:e.states)==null?void 0:f.csv)==null?void 0:g.delimiter_character}),a(o,{helperText:"Enter the full path to your CSV file on the server or a public URL. Examples: /uploads/data.csv or https://example.com/data.csv",label:"File path/URL",onChange:t=>r("file_path",t),value:(x=(S=e==null?void 0:e.states)==null?void 0:S.csv)==null?void 0:x.file_path})]})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(s,e){return this.cache.has(s)?this.cache.get(s):(this.cache.set(s,e),e)}};export{ne as default};
