"use client";

import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import { ReportViewerComponent } from "./ReportViewerComponent";
import { ReportViewerConfigPanel } from "./ReportViewerConfigPanel";
import type { ReportViewerConfig } from "./types";

export const V2ReportViewerDefinition = createComponentDefinition({
  id: "v2-report-viewer",
  name: "리포트 뷰어",
  nameEng: "Report Viewer",
  description: "메뉴에 연결된 리포트 목록을 표시하고 미리보기/PDF 다운로드를 제공하는 컴포넌트",
  category: ComponentCategory.DISPLAY,
  webType: "text",
  component: ReportViewerComponent,
  defaultConfig: {
    title: "리포트",
  } as Partial<ReportViewerConfig>,
  defaultSize: { width: 300, height: 200 },
  configPanel: ReportViewerConfigPanel as any,
  icon: "FileText",
  tags: ["리포트", "report", "PDF", "미리보기", "뷰어"],
  version: "1.0.0",
  author: "개발팀",
});

export type { ReportViewerConfig } from "./types";
