import { VariationStore } from "../stores/VariationStore"; import { CurrentPageStore } from "../stores/CurrentPageStore"; import { PagesStore } from "../stores/PagesStore"; import { Page, PageId } from "../models"; import { NavigationStore } from "../stores/NavigationStore"; export declare class VariationRules { static variationStore: VariationStore; static currentPageStore: CurrentPageStore; static pagesStore: PagesStore; static navigationStore: NavigationStore; /** * Rule if multilingual or single title should setting should be shown * */ static showOneLanguageTitle(): boolean; /** * Try to get a fallback page id of a page following the variation rules * * If no variation setup: * -return null, when the page is soft-deleted * -return the page id, when the page is NOT soft-deleted * * If variation setup: * -return null, when the original page is soft-deleted * -return original page id, when only the variation page is soft-deleted * -return variation page id, when the variation page is NOT soft-deleted * * @param page */ static getFallbackNotSoftDeletedPageId(page: Page): PageId; /** * Try to get a fallback page of a page following the variation rules * * If no variation setup: * -return null, when the page is soft-deleted * -return the page, when the page is NOT soft-deleted * * If variation setup: * -return null, when the original page is soft-deleted * -return original page, when only the variation page is soft-deleted * -return variation page, when the variation page is NOT soft-deleted * * * @param page * @param returnThePageIfNoFallbackPage instead of return null, return the page */ static getFallbackNotSoftDeletedPage(page: Page, returnThePageIfNoFallbackPage: boolean): Promise; /** * Try to get a fallback page id of a page following the variation rules * * If no variation setup: * -return null, when the page is hidden * -return the page id, when the page is NOT hidden * * If variation setup: * -return null, when the original page is hidden * -return original page id, when only the variation page is hidden * -return variation page id, when the variation page is NOT hidden * * @param page */ static getFallbackNotHiddenPageId(page: Page): PageId; /** * Try to get a fallback page of a page following the variation rules * * If no variation setup: * -return null, when the page is hidden * -return the page, when the page is NOT hidden * * If variation setup: * -return null, when the original page is hidden * -return original page, when only the variation page is hidden * -return variation page, when the variation page is NOT hidden * * * @param page * @param returnThePageIfNoFallbackPage instead of return null, return the page */ static getFallbackNotHiddenPage(page: Page, returnThePageIfNoFallbackPage: boolean): Promise; /** * Try to get a fallback page of a page following the variation rules * * If no variation setup: * -return null, when the page is hidden or soft-deleted * -return the page, when the page is NOT hidden and NOT soft-deleted * * If variation setup: * -return null, when the original page is hidden or soft-deleted * -return original page, when only the variation page is hidden or soft-deleted * -return variation page, when the variation page is NOT hidden and NOT soft-deleted * * * @param inputPage * @param returnThePageIfNoFallbackPage instead of return null, return the page */ static getFallbackPage(inputPage: Page, returnThePageIfNoFallbackPage: boolean): Promise; }