import { isValidElement, useMemo } from 'react';
import { CollectionPageHeader } from '../components/CollectionPageHeaderNew';
export function usePageHeader(childrenArr) {
    const header = useMemo(() => childrenArr.find((child) => isValidElement(child) && child.type === CollectionPageHeader), [childrenArr]);
    const { text: title, hideTotal } = header?.props?.title || {};
    return { header, title, hideTotal };
}
//# sourceMappingURL=usePageHeaderNew.js.map