import styles from './MarketplacesPage.module.css';
import PageBlock from "../../../components/PageBlock/PageBlock.tsx";
import ClientSelectNew from "../../../components/Selects/ClientSelectNew/ClientSelectNew.tsx";
import useMarketplacesPageState from "../hooks/useMarketplacesPageState.tsx";
import MarketplacesTable from "../components/MarketplacesTable/MarketplacesTable.tsx";

export const MarketplacesPage = () => {
    const state = useMarketplacesPageState();
    return (
        <div className={styles['container']}>
            <PageBlock>
                <div className={styles['top-panel']}>
                    <ClientSelectNew
                        placeholder={'Выберите клиента'}
                        onChange={state.setClient}
                    />
                </div>
            </PageBlock>
            <PageBlock>
                <>
                    <MarketplacesTable
                        {...state}
                    />

                </>
            </PageBlock>
        </div>
    )
}