"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[5434],{55434:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var l=n(65e3),a=n(27439),r=n(33689),o=n(3082),c=n(97976),u=n.n(c),s=n(44945),i=n(96073),d=n(61851);const p=s.z.any();function m({outputs:e,setOutputs:t}){return u().createElement("div",{className:"w-full flex flex-col space-y-2"},u().createElement("div",null,e?e[0].name:"No file uploaded"),u().createElement(a.Z,{customRequest:({file:e,onSuccess:n})=>{t([e]),n&&n({})}},u().createElement(r.ZP,{icon:u().createElement(i.Z,null)},"Upload File")))}function f({outputs:e,download:t}){const n=s.z.object({reserved:s.z.literal("file"),url:s.z.string().url()}).parse(e[0]);return u().createElement(r.ZP,{icon:u().createElement(d.Z,null),onClick:()=>{t&&t(n.url)}},"Download File")}const v=function({callAfterUpdateInpOuts:e=(()=>{}),node:t,setNode:n}){return p.parse(t.data),(0,c.useEffect)((()=>{n((e=>({...e,data:{},operator:"ui",num_inputs:0,num_outputs:1,subcomponents:{ui:m,output:f}}))),e()}),[]),u().createElement(E,null,u().createElement(o.Z.Text,null,"File Upload"))};var E=(0,l.ZP)("div").withConfig({displayName:"FileUploadNode___StyledDiv",componentId:"sc-1lpeezp-0"})({display:"flex",flexDirection:"column","> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(0.5rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(0.5rem * var(--tw-space-y-reverse))"}})}}]);