"use client";

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

/**
 * GroupedTable 렌더러 (Phase G.3.1) — id "grouped-table" 자가 등록.
 */
export class GroupedTableRenderer extends AutoRegisteringComponentRenderer {
  static componentDefinition = GroupedTableDefinition;

  render(): React.ReactElement {
    return <GroupedTableComponent {...this.props} renderer={this} />;
  }
}

GroupedTableRenderer.registerSelf();

if (process.env.NODE_ENV === "development") {
  GroupedTableRenderer.enableHotReload();
}
