// TagName for the main content area
prototype(GesagtGetan.Basic:MainTagName) < prototype(Neos.Fusion:Value) {
    value = 'main'
}

// Attributes for the main content area
prototype(GesagtGetan.Basic:MainAttributes) < prototype(Neos.Fusion:Attributes) {
    id = 'main'
    aria-label = 'Content'
    class = GesagtGetan.Basic:MainAttributesClassArray
}

// Raw Array of the classes for the `GesagtGetan.Basic:MainAttributes`. Used also for the `body` tag
prototype(GesagtGetan.Basic:MainAttributesClassArray) < prototype(Neos.Fusion:RawArray) {
    namespace = 'main'
    component = 'element'
    prepend = ${'-'}
    parents = ${q(documentNode).parents()}
    count = ${this.parents.count()}

    @ignoreProperties = ${['namespace', 'component', 'prepend', 'parents', 'count']}
    @context {
        prepend = ${this.prepend}
        config = GesagtGetan.Basic:Config
    }

    element = ${this.namespace + '-' + this.component}
    layout = ${layout ? String.toLowerCase('layout-' + String.replace(layout, '.', '-')) : false}
    level = ${this.prepend + (this.count == 0 ? 'index' : 'deep' + this.count)}
    subpages = ${this.prepend + (this.parents.is() && q(documentNode).children(config.baseConfiguration.subpagesFilter).filter('[_hiddenInIndex=false]').is() ? 'hassub' : 'nosub')}
    subpages.@if.isNotIndex = ${!!this.count}
    type = GesagtGetan.Basic:NodeTypeName {
        node = ${documentNode}
        prepend = ${prepend}
    }
}
