import { useState } from 'react';
import { EntityPageState } from '../state';
import { useWixPatternsContainer } from '@wix/bex-core/react';
import { useWixPatternsRouter } from '../providers/WixPatternsRouterProvider';
export function useEntityPage(props) {
    const container = useWixPatternsContainer();
    const routerState = useWixPatternsRouter();
    const [state] = useState(() => {
        return new EntityPageState({ container, routerState, ...props });
    });
    return state;
}
//# sourceMappingURL=useEntityPage.js.map