"use client";

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

/**
 * RelatedDataButtons 렌더러
 * 자동 등록 시스템을 사용하여 컴포넌트를 레지스트리에 등록
 */
export class RelatedDataButtonsRenderer extends AutoRegisteringComponentRenderer {
  static componentDefinition = RelatedDataButtonsDefinition;

  render(): React.ReactElement {
    const { component } = this.props;
    
    return (
      <RelatedDataButtonsComponent
        config={component?.config || RelatedDataButtonsDefinition.defaultConfig}
        className={component?.className}
        style={component?.style}
      />
    );
  }
}

// 자동 등록 실행
RelatedDataButtonsRenderer.registerSelf();
