import SimpleUsersTable from "../../pages/LeadsPage/components/SimpleUsersTable/SimpleUsersTable.tsx";
import {ContextModalProps} from "@mantine/modals";
import {Flex, rem} from "@mantine/core";
import {UserSchema} from "../../client";
import {MutableRefObject, useEffect} from "react";

type Props = {
    items: MutableRefObject<UserSchema[]>
    onChange: (items: UserSchema[]) => void;
};

const EmployeeTableModal = ({
                                innerProps
                            }: ContextModalProps<Props>) => {
    useEffect(() => {
    }, [innerProps.items.current])
    return (
        <Flex direction={"column"} gap={rem(10)}>
            <SimpleUsersTable
                items={innerProps.items.current}
                onChange={(event) => {
                    innerProps.onChange(event);
                }}
            />

        </Flex>
    )
}
export default EmployeeTableModal;