"use client";

import React from "react";
import { NumberingRuleDesigner } from "@/components/numbering-rule/NumberingRuleDesigner";
import { NumberingRuleComponentConfig } from "./types";

interface NumberingRuleWrapperProps {
  config: NumberingRuleComponentConfig;
  onChange?: (config: NumberingRuleComponentConfig) => void;
  isPreview?: boolean;
}

export const NumberingRuleWrapper: React.FC<NumberingRuleWrapperProps> = ({
  config,
  onChange,
  isPreview = false,
}) => {
  return (
    <div className="h-full w-full">
      <NumberingRuleDesigner
        maxRules={config.maxRules || 6}
        isPreview={isPreview}
        className="h-full"
      />
    </div>
  );
};

export const NumberingRuleComponent = NumberingRuleWrapper;
