"use client";

import React from "react";
import { ComponentData } from "@/types/screen";
import { componentRegistry, ComponentRenderer } from "../DynamicComponentRenderer";
import { File } from "lucide-react";

// 파일 컴포넌트 렌더러
const FileRenderer: ComponentRenderer = ({ component, ...props }) => {
  return (
    <div className="flex h-full flex-col">
      <div className="pointer-events-none flex-1 rounded border-2 border-dashed border-input bg-muted p-4">
        <div className="flex h-full flex-col items-center justify-center text-center">
          <File className="mb-2 h-8 w-8 text-muted-foreground/70" />
          <p className="text-sm text-muted-foreground">파일 업로드 영역</p>
          <p className="mt-1 text-xs text-muted-foreground/70">미리보기 모드</p>
        </div>
      </div>
    </div>
  );
};

// 레지스트리에 등록
componentRegistry.register("file", FileRenderer);

export { FileRenderer };
