"use client";

import React from "react";
import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import type { WebType } from "@/types/screen";
import { FileUploadComponent } from "./FileUploadComponent";
import { FileUploadConfigPanel } from "./FileUploadConfigPanel";
import { FileUploadConfig } from "./types";

/**
 * FileUpload 컴포넌트 정의
 * file-upload 컴포넌트입니다
 */
export const FileUploadDefinition = createComponentDefinition({
  id: "file-upload",
  name: "파일 업로드 (레거시)",
  nameEng: "FileUpload Component (Legacy)",
  description: "파일 업로드를 위한 파일 선택 컴포넌트 (레거시)",
  category: ComponentCategory.INPUT,
  webType: "file",
  component: FileUploadComponent,
  defaultConfig: {
    placeholder: "입력하세요",
  },
  defaultSize: { width: 350, height: 240 },
  configPanel: FileUploadConfigPanel,
  icon: "Edit",
  tags: [],
  version: "1.0.0",
  author: "개발팀",
  documentation: "https://docs.example.com/components/file-upload",
  hidden: true, // v2-file-upload 사용으로 패널에서 숨김
});

// 타입 내보내기
export type { FileUploadConfig } from "./types";

// 컴포넌트 내보내기
export { FileUploadComponent } from "./FileUploadComponent";
export { FileUploadRenderer } from "./FileUploadRenderer";
