"use client";

import React from "react";
import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import type { WebType } from "@/types/screen";
import { DateInputComponent } from "./DateInputComponent";
import { DateInputConfigPanel } from "./DateInputConfigPanel";
import { DateInputConfig } from "./types";

/**
 * DateInput 컴포넌트 정의
 * date-input 컴포넌트입니다
 */
export const DateInputDefinition = createComponentDefinition({
  id: "date-input",
  name: "날짜 선택",
  nameEng: "DateInput Component",
  description: "날짜 선택을 위한 날짜 선택기 컴포넌트",
  category: ComponentCategory.INPUT,
  webType: "date",
  component: DateInputComponent,
  defaultConfig: {
    placeholder: "입력하세요",
  },
  defaultSize: { width: 220, height: 40 },
  configPanel: DateInputConfigPanel,
  icon: "Edit",
  tags: [],
  version: "1.0.0",
  author: "개발팀",
  documentation: "https://docs.example.com/components/date-input",
});

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

// 컴포넌트 내보내기
export { DateInputComponent } from "./DateInputComponent";
export { DateInputRenderer } from "./DateInputRenderer";
