import drawerRegistry from "./drawersRegistry";

export type DrawerRegistry = typeof drawerRegistry;

export type DrawerKey = keyof DrawerRegistry;

export type DrawerProps<T = unknown> = {
    opened: boolean;
    onClose: () => void;
    props: T;
};

export type DrawersStackState = {
    key: DrawerKey;
    props?: any;
    onClose?: () => void;
    opened?: boolean;
};

export type OpenDrawerParams<TKey extends DrawerKey> = {
    key: TKey;
    props?: Parameters<DrawerRegistry[TKey]>[0]["props"];
    onClose?: () => void;
};
