"use client";

import * as LabelPrimitives from "@radix-ui/react-label";
import React from "react";
import { cx } from "../lib/utils";

interface OnboardingLabelProps
	extends React.ComponentPropsWithoutRef<typeof LabelPrimitives.Root> {
	disabled?: boolean;
}

const OnboardingLabel = React.forwardRef<
	React.ElementRef<typeof LabelPrimitives.Root>,
	OnboardingLabelProps
>(({ className, disabled, ...props }, forwardedRef) => (
	<LabelPrimitives.Root
		ref={forwardedRef}
		className={cx(
			"text-sm leading-none",
			"text-foreground",
			{
				"text-muted-foreground": disabled,
			},
			className,
		)}
		aria-disabled={disabled}
		{...props}
	/>
));

OnboardingLabel.displayName = "OnboardingLabel";

export { OnboardingLabel };
