"use client";

import React from "react";
import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import type { WebType } from "@/types/screen";
import { DividerLineWrapper } from "./DividerLineComponent";
import { V2DividerLineConfigPanel } from "@/components/v2/config-panels/V2DividerLineConfigPanel";
import { DividerLineConfig } from "./types";

/**
 * DividerLine 컴포넌트 정의
 * divider-line 컴포넌트입니다
 */
export const V2DividerLineDefinition = createComponentDefinition({
  id: "v2-divider-line",
  name: "구분선",
  nameEng: "DividerLine Component",
  description: "영역 구분을 위한 구분선 컴포넌트",
  category: ComponentCategory.LAYOUT,
  webType: "text",
  component: DividerLineWrapper,
  defaultConfig: {
    placeholder: "텍스트를 입력하세요",
    maxLength: 255,
  },
  defaultSize: { width: 400, height: 2 },
  configPanel: V2DividerLineConfigPanel,
  icon: "Layout",
  tags: [],
  version: "1.0.0",
  author: "Developer",
  documentation: "https://docs.example.com/components/divider-line",
});

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

// 컴포넌트 내보내기
export { DividerLineComponent } from "./DividerLineComponent";
export { DividerLineRenderer } from "./DividerLineRenderer";
