import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { fieldset } from "./fieldsetStyles.js";
/**
 * @example Simple Example
 * ```tsx
 * import { Form } from "@react-md/core/form/Form";
 * import { Fieldset } from "@react-md/core/form/Fieldset";
 * import { Legend } from "@react-md/core/form/Legend";
 *
 * function Example(): ReactElement {
 *   return (
 *     <Form>
 *       <Fieldset>
 *         <Legend>Some Title</Legend>
 *         // form components
 *       </Fieldset>
 *     </Form>
 *   );
 * }
 * ```
 *
 * @example Floating Legend Example
 * ```tsx
 * import { Form } from "@react-md/core/form/Form";
 * import { Fieldset } from "@react-md/core/form/Fieldset";
 * import { Legend } from "@react-md/core/form/Legend";
 *
 * function Example(): ReactElement {
 *   return (
 *     <Form>
 *       <Fieldset floatingLegend>
 *         <Legend floating>Some Title</Legend>
 *         // form components
 *       </Fieldset>
 *     </Form>
 *   );
 * }
 * ```
 * ```
 *
 * @see {@link https://react-md.dev/components/fieldset | Fieldset Demos}
 */ export const Fieldset = /*#__PURE__*/ forwardRef(function Fieldset(props, ref) {
    const { className, fullWidth, browserStyles, floatingLegend, children, ...remaining } = props;
    return /*#__PURE__*/ _jsx("fieldset", {
        ...remaining,
        ref: ref,
        className: fieldset({
            className,
            fullWidth,
            browserStyles,
            floatingLegend
        }),
        children: children
    });
});

//# sourceMappingURL=Fieldset.js.map