import { isValidElement, useMemo } from 'react';
import { Page } from '@wix/design-system';
export function usePageHeader(childrenArr) {
    const header = useMemo(() => childrenArr.find((child) => isValidElement(child) && child.type === Page.Header), [childrenArr]);
    const title = typeof header?.props?.title === 'string' ? header?.props?.title : null;
    return { header, title };
}
//# sourceMappingURL=usePageHeader.js.map