import { match } from 'path-to-regexp';

const path = '/scene/revs/:sceneId/:slug?';
const urlMatch = match(path, { decode: decodeURIComponent });

export default (pageContext) => {
	const matched = urlMatch(pageContext.urlPathname);

	if (matched) {
		return {
			routeParams: {
				sceneId: matched.params.sceneId,
				domain: 'scenes',
			},
		};
	}

	return false;
};
