"use client";

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

export class ContainerRenderer extends AutoRegisteringComponentRenderer {
  static componentDefinition = ContainerDefinition;

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

ContainerRenderer.registerSelf();

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