"use client";

import React from "react";
import { AutoRegisteringComponentRenderer } from "../../AutoRegisteringComponentRenderer";
import { AccordionBasicDefinition } from "./index";

/**
 * AccordionBasic 컴포넌트 렌더러
 * 자동 등록 기능을 포함한 컴포넌트 렌더러
 */
export class AccordionBasicRenderer extends AutoRegisteringComponentRenderer {
  static componentDefinition = AccordionBasicDefinition;

  constructor(props: any) {
    super(props);
  }

  render(): React.ReactElement {
    const { component, ...restProps } = this.props;
    return React.createElement(AccordionBasicDefinition.component, {
      component,
      ...restProps,
    });
  }
}

// 렌더러 인스턴스 생성 및 자동 등록
AccordionBasicRenderer.registerSelf();
