import type { Document } from '@pantheon-systems/css-client'; /** One row of the child-page tree: a page, or an address that only groups the pages under it. */ export interface ChildPageNode { /** The address the row nests by. */ path: string; /** The page's title, or the address segment when there is no page there. */ title: string; /** False for an address that only groups pages under it and is not a page itself. */ isPage: boolean; /** Whether a page sits at this address at all, live or down. */ hasPage: boolean; /** Live pages anywhere below this one. */ pagesBelow: number; children: ChildPageNode[]; /** * The address shown, when it differs from `path`, which nests the row: a translation nests by the page it * was translated from. */ address?: string; } /** A live translation the Unpublish dialog offers to take down with the page. */ export interface UnpublishTranslation { id: string; path: string; title: string; /** Its locale tag, or null when it has none. */ locale: string | null; /** True for a translation of a child page, offered only when the child pages go down too. */ ofChild: boolean; /** The page this is a translation of. Without it, a child page's translation follows the child-pages box. */ originalId?: string; } /** The live pages the Unpublish dialog offers to take down with the open page. */ export interface UnpublishChildPages { /** The open page's title. */ title: string; /** The child pages, nested by address. */ tree: ChildPageNode[]; /** Every child page's address; these are not offered as somewhere to redirect visitors. */ paths: string[]; /** Every child page's id, sent as `childDocumentIds` when the editor takes them down. */ ids: string[]; /** Set on a translated page: the locale its child pages are in. */ locale?: string; /** Translations of the page and of its child pages, offered one locale at a time. Leave it out to offer none. */ translations?: UnpublishTranslation[]; /** The ids of the live page at each row, keyed by the row's `path`. Without it the list is all or none. */ idsByPath?: Record; } /** * The page's title and the live pages that go down with it, nested by address at any depth: on a page that * is not a translation, its child pages plus its translations and theirs; on a translated page, the translations * in its locale of the pages under the page it was translated from. `paths` keeps them out of the redirect * targets, and `ids` names them. */ export declare function unpublishChildPages(documents: Document[], pagePath: string): UnpublishChildPages;