import {useContentListPage} from "../hook/page/useContentListPage.ts";
import {PageHeader} from "../../../component/PageHeader.tsx";
import {ListSearchForm} from "../../../component/ListSearchForm.tsx";
import {Pagination} from "../../../component/pagination/Pagination.tsx";
import {ActionButtonListGroup} from "../../../component/button/ActionButtonListGroup.tsx";
import {useLoadingToast} from "../../../hook/useLoadingToast.ts";
import {ContentListTable} from "../component/ContentListTable.tsx";

export const ContentListPage = () => {
    const {header, search, status, actions, pagination, table} = useContentListPage();

    useLoadingToast(status);
    return (
        <>
            <PageHeader {...header} />
            <ListSearchForm {...search}
                            totalLabel="총 게시물"
            />
            <ContentListTable {...table} />
            <ActionButtonListGroup {...actions} />
            <Pagination {...pagination} />
        </>
    )
}