import { controlChip, type ControlChipVariantProps } from "@seed-design/css/recipes/control-chip";
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
import type * as React from "react";
import { createRecipeContext } from "../../utils/createRecipeContext";
import { withIconRequired } from "../Icon/Icon";
const { withContext } = createRecipeContext(controlChip);
/**
* @deprecated ControlChipBaseProps is deprecated. Use ChipBaseProps from Chip instead.
*/
export interface ControlChipBaseProps extends PrimitiveProps, ControlChipVariantProps {}
/**
* @deprecated ControlChipProps is deprecated. Use Chip.Toggle or Chip.Button instead.
*
* Migration guide:
* ```tsx
* // Before
* Label
*
* // After
* import { Chip } from "@seed-design/react";
* Label
* ```
*/
export interface ControlChipProps
extends ControlChipBaseProps,
React.HTMLAttributes {}
/**
* @deprecated ControlChip is deprecated. Use Chip.Toggle or Chip.Button instead.
*/
export const ControlChip = withIconRequired(
withContext(Primitive.button),
(props: ControlChipProps) => props.layout === "iconOnly",
);
ControlChip.displayName = "ControlChip";