import React from 'react';
import { RuleDefinition, RuleVariant, OverrideHistoryResponse, RuleTier } from '../types';
import RuleAccordionShell, { RuleAccordionShellProps } from './RuleAccordionShell';
import VariantList, { VariantListProps } from './VariantList';
/**
 * Props for the RuleAccordion component.
 * This is a convenience wrapper that combines RuleAccordionShell and either VariantList.
 * For more flexibility, use RuleAccordionShell and VariantList separately.
 * Library-ready: fully controlled via props, no store access, no API calls.
 */
interface RuleAccordionProps {
    /** The rule definition object */
    rule: RuleDefinition;
    /** Index of the rule in the list */
    idx: number;
    /** Selected rule set ID used for scoped RBAC checks */
    ruleSetId?: string;
    /** All tiers data for linked variant lookup */
    allTiers?: RuleTier[];
    /** Current tier ID */
    currentTierId?: string;
    /** Callback when remove/delete rule is clicked */
    onRemove?: () => void;
    /** Whether the current rule set is global scope */
    isGlobalScope?: boolean;
    /**
     * Optional handler to fetch override history for a rule/variant.
     * Parent component should implement API call logic.
     * Returns OverrideHistoryResponse or null on error.
     */
    onFetchOverrideHistory?: (ruleId: string, variantId?: string) => Promise<OverrideHistoryResponse | null>;
    /** Custom label for delete rule button */
    deleteButtonLabel?: string;
    /** Custom label for "Inherited override" chip */
    inheritedOverrideLabel?: string;
    /** Custom label for "Default variant" chip */
    defaultVariantLabel?: string;
    /** Custom label for "View Override" button */
    viewOverrideLabel?: string;
    /** Custom label for "Hide Override" button */
    hideOverrideLabel?: string;
    /** Custom label for "Enable Learning" button for variant*/
    enableLearningVariantLabel?: string;
    /** Custom label for "Disable Learning" button for variant*/
    disableLearningVariantLabel?: string;
    /** Custom label for "Enable Learning" button for Rule*/
    enableLearningRuleLabel?: string;
    /** Custom label for "Disable Learning" button for Rule*/
    disableLearningRuleLabel?: string;
    /** Custom label for "Edit" button */
    editButtonLabel?: string;
    /** Custom label for "When to Apply" section */
    whenToApplyLabel?: string;
    /** Custom label for "When Not to Apply" section */
    whenNotToApplyLabel?: string;
    /** Custom text for no conditions */
    noConditionsText?: string;
    /** Custom error message when history fetch fails */
    historyErrorMessage?: string;
    /** Custom error message when rule ID is missing */
    missingRuleIdMessage?: string;
    /** Callback when Edit button is clicked for a variant */
    onEditVariant?: (variant: RuleVariant, ruleId: string, tierName?: string, action?: 'edit' | 'resolve_gaps') => void;
    /** Callback when Delete button is clicked for a variant */
    onDeleteVariant?: (variantId: string, ruleId: string) => void;
    /** Callback when Edit button is clicked (legacy - for rules without variants) */
    onEdit?: (rule: RuleDefinition, tierName?: string) => void;
    /** Tier name to pass when onEdit is called (e.g., "Tier 1", "Tier 2") */
    tierName?: string;
    /** func for fetch rules for enable/disable Btn */
    onToggleSuccess?: () => void;
    /** Framer Motion drag controls */
    dragControls?: any;
    /** Whether the accordion should be open by default. Defaults to false. */
    defaultOpen?: boolean;
    /** Whether to show the delete button in the header. Defaults to true. */
    showDeleteButton?: boolean;
    /** Whether to show the actions bar (View Override, Edit). Defaults to true. */
    showActionsBar?: boolean;
    /** Custom tier chip to display instead of the default variant chip. If provided, replaces the default. */
    tierChip?: React.ReactNode;
    /** Custom variant chip to display. If tierChip is provided, this is ignored. */
    customVariantChip?: React.ReactNode;
    /** Whether to show the rule description box. Defaults to true. */
    showDescriptionBox?: boolean;
    /** Custom description text to override rule.ruleDesc */
    customDescription?: string;
    /** Whether to show the condition blocks. Defaults to true. */
    showConditions?: boolean;
    /** Whether to show the inheritance breadcrumb. Defaults to true */
    showInheritance?: boolean;
    /** Whether to show connecting lines between variants. Defaults to true */
    showConnectors?: boolean;
    /** Additional class name for the root container */
    className?: string;
    /** Map of highlighted variant IDs to their action type */
    highlightedVariants?: Map<string, 'new' | 'existing'>;
    /** Display names of all tiers that have highlighted variants (for cross-tier banner) */
    highlightedTierNames?: string[];
    /** Callback to indicate which type of delete confirmation is used */
    setDeleteConfirmationUsedFor?: (value: 'ruleDeletion' | 'variantDeletion') => void;
    onCopyToTier?: (variant: RuleVariant, ruleId: string, ruleTitle: string, sourceTier: string, targetTier: string) => void;
}
/**
 * Accordion component for displaying a single rule with expandable details.
 * Automatically handles both new variants-based rules and legacy flat rules.
 *
 * When rule.variants[] exists, renders VariantList inside the accordion.
 * This is a convenience wrapper that combines RuleAccordionShell and content.
 *
 * For more flexibility (using accordion with different content, or content without accordion),
 * use RuleAccordionShell and VariantList separately as composable "Lego blocks".
 *
 * @example
 * // Simple usage with variants (new structure)
 * <RuleAccordion rule={ruleWithVariants} idx={0} onEditVariant={handleEdit} />
 *
 * @example
 * // Composable usage - variants
 * <RuleAccordionShell rule={rule} idx={0}>
 *   <VariantList variants={rule.variants} ruleId={rule.ruleId} />
 * </RuleAccordionShell>
 *
 * @param props - Component props
 * @returns JSX element displaying the rule accordion
 */
declare const RuleAccordion: React.FC<RuleAccordionProps>;
export default RuleAccordion;
export { RuleAccordionShell, VariantList };
export type { RuleAccordionShellProps, VariantListProps };
//# sourceMappingURL=RuleAccordion.d.ts.map