<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
      xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
      xmlns:ama="http://typo3.org/ns/AmadeusAgentur/AmadeusNext/ViewHelpers"
      data-namespace-typo3-fluid="true">
<f:layout name="Mask"/>


<f:comment>
    <v:content.resources.fal table="tx_amadeusnext_domain_model_client" field="logo" uid="{client.uid}" as="cl_logo">
        <f:debug>{cl_logo}</f:debug>
        <f:image src="{cl_logo.0.url}" alt="{cl_logo.0.name}" width="{cl_logo.0.width}" height="{cl_logo.0.height}"/>
    </v:content.resources.fal>
</f:comment>


<f:section name="Before">
    <div class="bg-zinc-900 bg-{data.color_scheme}">
</f:section>
<f:section name="Header">
    {ama:client(clientId: parentRecord.clientId) -> f:variable(name: 'client')}
    {v:content.resources.fal(table: 'tx_amadeusnext_domain_model_client', field: 'logowhite', uid: '{client.uid}', asObjects: 'true') -> v:iterator.first() -> f:variable(name: 'clientLogo')}
    {v:page.info() -> f:variable(name: 'page')}
    <div class="relative not-prose after:block after:absolute after:bg-gradient-to-t after:from-zinc-900/40 after:to-50% after:w-full after:h-full after:top-0">
        <f:if condition="{data.media.0}">
            <f:then>
                <f:render partial="Media/Case" arguments="{data:data, fileDesktop:data.media.0, fileMobile:data.tx_mask_media_responsive.0, croppedHeight:'true', caption:'false', bgColor:page.casecolor, loading:'eager'}"/>
            </f:then>
            <f:else>
                Bild fehlt
            </f:else>
        </f:if>
    </div>
    <header class="relative mx-auto w-11/12 lg:w-10/12 xl:w-8/12">
        <h1 class="font-extrabold tracking-tight text-5xl md:text-6xl lg:text-7xl xl:text-8xl 2xl:text-9xl mb-[1em] text-white text-center mt-[-1.5em] ">
            <f:if condition="{data.header}">
                <f:then>{data.header -> f:format.html(parseFuncTSPath: 'lib.parseFunc')}</f:then>
                <f:else>{v:page.info(field: 'title') -> f:format.html(parseFuncTSPath: 'lib.parseFunc')}</f:else>
            </f:if>
        </h1>
        <div class="text-center">
            <f:if condition="{clientLogo}">
                <f:image image="{clientLogo}" class="inline-block h-28 xl:h-48 w-auto max-w-[200px] my-8" width="auto" height="100"/>
                <div class="font-heading tracking-wide text-white text-2xl xl:text-3xl 2xl:text-4xl mb-6 lg:mb-7 xl:mb-8">{client.company}</div>
            </f:if>
        </div>
    </header>
</f:section>

<f:section name="Main">
    <div class="container">
        <div class="py-8 lg:py-16 px-4 lg:px-12 mx-auto max-w-screen-xl text-center ">
            <div class="prose prose-lg xl:prose-xl 2xl:prose-2xl mx-auto prose-light">
                <f:if condition="{data.bodytext}">
                    <f:then>{data.bodytext -> f:format.html(parseFuncTSPath: 'lib.parseFunc_RTE')}</f:then>
                    <f:else>{v:page.info(field: 'casedescription') -> f:format.html(parseFuncTSPath: 'lib.parseFunc_RTE')}</f:else>
                </f:if>
            </div>
        </div>
    </div>
</f:section>
<f:section name="After">
    </div>
</f:section>
