"use client";

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

/**
 * CardList 렌더러 (Phase G.3.1) — id "card-list" 자가 등록.
 */
export class CardListRenderer extends AutoRegisteringComponentRenderer {
  static componentDefinition = CardListDefinition;

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

CardListRenderer.registerSelf();

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