# configuration/strings/ontology.fragment.strings.ts

> 53 lines of code and 5 definitions.

Tree: Site tree
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/tree#file-configuration-strings-ontology-fragment-strings-ts
Source text: https://banes-lab.com/assets/sources/source.742120e6104cf29c0aeedf699d33e0a881d7e71ffdbc5ccb7b4f98a0c0e9a075.generated.txt

## Definitions

- `RESOLUTION_NOTE` (lexical_declaration, line 28)
- `lazyTab` (lexical_declaration, line 30)
- `held` (lexical_declaration, line 31)
- `sections` (method_definition, line 37)
- `ONTOLOGY_TABS` (lexical_declaration, line 44, exported)

## Source

```typescript
import {
    ALGORITHMS_LABEL,
    LEXICON_LABEL,
    PRINCIPLES_LABEL,
    REASONING_LABEL,
    RESOLVES_TEXT,
    SCHEMA_LABEL,
    UNRESOLVED_TEXT,
} from "#configuration/strings/ontology.strings";
import { ALGORITHMS_TAB, LEXICON_TAB, PRINCIPLES_TAB, REASONING_TAB, SCHEMA_TAB } from "#core/ids/ontology.ids";
import {
    ONTOLOGY_ALGORITHMS_ICON,
    ONTOLOGY_LEXICON_ICON,
    ONTOLOGY_PRINCIPLES_ICON,
    ONTOLOGY_REASONING_ICON,
    ONTOLOGY_SCHEMA_ICON,
} from "#configuration/icons/ontology.icons";
import type { Section, Tab } from "#types/document.types";
import { ONTOLOGY } from "#core/assets/ontology.generated";
import { catalogSections } from "#domain/converters/catalog.converter";
import { contractSections } from "#domain/converters/contract.converter";
import { kindSections } from "#domain/converters/kind.converter";
import { lexiconSections } from "#domain/converters/lexicon.converter";
import { principleSections } from "#domain/converters/principle.converter";
import { spineSections } from "#domain/converters/reason.converter";
import { tensionSections } from "#domain/converters/tension.converter";

const RESOLUTION_NOTE = ONTOLOGY.resolves ? RESOLVES_TEXT : UNRESOLVED_TEXT;

const lazyTab = function lazyTab(icon: string, id: string, label: string, build: () => readonly Section[]): Tab {
    let held: readonly Section[] | null = null;
    return {
        icon,
        id,
        label,
        layout: "ontology",
        get sections(): readonly Section[] {
            held ??= build();
            return held;
        },
    };
};

export const ONTOLOGY_TABS: readonly Tab[] = [
    lazyTab(ONTOLOGY_PRINCIPLES_ICON, PRINCIPLES_TAB, PRINCIPLES_LABEL, () => principleSections(ONTOLOGY.principles)),
    lazyTab(ONTOLOGY_LEXICON_ICON, LEXICON_TAB, LEXICON_LABEL, () => lexiconSections(ONTOLOGY.terms)),
    lazyTab(ONTOLOGY_ALGORITHMS_ICON, ALGORITHMS_TAB, ALGORITHMS_LABEL, () => contractSections(ONTOLOGY.contracts)),
    lazyTab(ONTOLOGY_REASONING_ICON, REASONING_TAB, REASONING_LABEL, () => [
        ...spineSections(ONTOLOGY.reason),
        ...catalogSections(ONTOLOGY.reason),
    ]),
    lazyTab(ONTOLOGY_SCHEMA_ICON, SCHEMA_TAB, SCHEMA_LABEL, () => [
        ...kindSections(ONTOLOGY.kinds, ONTOLOGY.ranges, ONTOLOGY.forces, RESOLUTION_NOTE),
        ...tensionSections(ONTOLOGY.layers),
    ]),
];
```
