import React, { forwardRef } from "react";
import { BodyLong, ErrorMessage } from "../../typography";
import { useId } from "../../utils-external";
import { cl } from "../../utils/helpers";
import { Checkbox, CheckboxProps } from "../checkbox";
import { useFormField } from "../useFormField";
export interface ConfirmationPanelProps extends Omit<
CheckboxProps,
"children" | "indeterminate" | "hideLabel" | "error" | "readOnly"
> {
/**
* Additional information on panel
*/
children?: React.ReactNode;
/**
* Checkbox label
*/
label: React.ReactNode;
/**
* Error message for element
*/
error?: React.ReactNode;
/**
* Override internal errorId
*/
errorId?: string;
}
/**
* A component that displays a confirmation checkbox with a label.
* @deprecated Use `Checkbox` instead. See [new pattern documentation](https://aksel.nav.no/monster-maler/soknadsdialog/introside-for-soknadsdialoger#8346a8cb849b) for more information.
*
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/confirmationpanel)
* @see 🏷️ {@link ConfirmationPanelProps}
*
* @example
* ```jsx