import React, { useState } from 'react'; import { Dialog, DialogProps, DialogWrapperContext, WrapperProps } from '@/components/elements/dialog'; function asDialog( initialProps?: WrapperProps // eslint-disable-next-line @typescript-eslint/ban-types ):
(C: React.ComponentType
) => React.FunctionComponent
 {
    return function (Component) {
        return function ({ open, onClose, ...rest }) {
            const [props, setProps] = useState