from __future__ import annotations

from typing import *  # type: ignore

import rio

from .page_builder import build_page
from .. import components as comps


class Imprint(rio.Component):
    @rio.event.on_window_size_change
    async def on_window_size_change(self) -> None:
        await self.force_refresh()

    @rio.event.on_populate
    async def on_populate(self) -> None:
        await self.session.set_title("EZ GG e.V. - Impressum")

    def build(self) -> rio.Component:
        return build_page(rio.Column(
            comps.build_news_post(
                header="Impressum",
                article_text_path_or_text="""
#### Einfach Zocken Gaming Gesellschaft e.V.
```txt
Im Elchgrund 18

35080 Bad Endbach - Bottenhorn

Telefon: +4917657993174

E-Mail: vorstand@ezgg-ev.de
```

#### Vertreten durch:
```txt
David Rodenkirchen

Julia Albring
```

#### Registereintrag:
```txt
Eingetragen im Vereinsregister.

Registergericht: Amtsgericht Marburg

Aktenzeichen: VR 5837
```

                """,
                date=""
            )
        ), window_width=self.session.window_width)
