import { CREATIVE_COMMONS, SITE_URL, pagePath } from "#assets/link.assets"; import { ONTOLOGY_ATTRIBUTION, ONTOLOGY_META } from "#configuration/strings/ontology.strings"; import { ONTOLOGY_DESCRIPTION, ONTOLOGY_TITLE } from "#configuration/strings/page.strings"; import { mountTabSwitching, renderTabbedPage } from "#presentation/widgets/tab.widget"; import { METHODOLOGY_AUTHOR } from "#configuration/strings/methodology.strings"; import { ONTOLOGY_PAGE } from "#core/ids/page.ids"; import { ONTOLOGY_TABS } from "#configuration/strings/ontology.fragment.strings"; import { ONTOLOGY_TONE } from "#configuration/constants/tab.constants"; import type { PageDefinition } from "#types/page.types"; import type { SchemaEntity } from "#types/schema.types"; import type { TabbedPage } from "#types/tab.types"; import { renderLicensedFooter } from "#presentation/renderers/methodology.renderer"; const ONTOLOGY_ENTITY: SchemaEntity = { "@type": "Dataset", author: { "@type": "Person", name: METHODOLOGY_AUTHOR }, description: ONTOLOGY_DESCRIPTION, license: CREATIVE_COMMONS, name: ONTOLOGY_META.title, url: SITE_URL + pagePath(ONTOLOGY_PAGE), version: ONTOLOGY_META.version, }; const renderOntologyFooter = function renderOntologyFooter(): Element { return renderLicensedFooter(ONTOLOGY_ATTRIBUTION); }; const DEFINITION: TabbedPage = { footer: renderOntologyFooter, layout: "grid", meta: ONTOLOGY_META, page: ONTOLOGY_PAGE, tabs: ONTOLOGY_TABS, tone: ONTOLOGY_TONE, }; const renderOntology = function renderOntology(): Element { return renderTabbedPage(DEFINITION); }; void mountTabSwitching(DEFINITION); export const PAGE: PageDefinition = { content: { kind: "tabbed", layout: DEFINITION.layout, meta: ONTOLOGY_META, tabs: ONTOLOGY_TABS }, description: ONTOLOGY_DESCRIPTION, entities: [ONTOLOGY_ENTITY], id: ONTOLOGY_PAGE, render: renderOntology, title: ONTOLOGY_TITLE, };