{:*
    Snippets and declares for tests
*:}

{:snippet; test-snippet >>
    <div>Hello from test-snippet</div>
:}

{:declare; test-declare >>
    es
    en
    de
    fr
    pt
:}

{:snippet; test-nested-snippet >>
    <div>Hello from test-nested-snippet</div>
    {:snippet; test-nested-snippet-nested >>
        <div>Hello from test-nested-snippet-nested</div>
    :}
:}

{:snippet; contact-form >>
    <form action="#" method="post">
        <label for="name">{:trans; Name :}:</label><br>
        <input type="text" id="name" name="name"><br><br>
        <label for="email">{:trans; Email :}:</label><br>
        <input type="email" id="email" name="email"><br><br>
        <label for="message">{:trans; Message :}:</label><br>
        <textarea id="message" name="message" rows="4" cols="50"></textarea><br><br>
        <input type="submit" value="Submit">
    </form>
:}

{:declare; font-size >>
    ~ {:* <-- empty string *:}
    small
    normal
    big
:}

{:declare; font-size-from-var >> {:;font-sizes:} :}

{:snippet; font-size-small >>
    font-size: 12px;
:}

{:snippet; font-size-normal >>
    font-size: 16px;
:}

{:snippet; font-size-big >>
    font-size: 20px;
:}

{:snippet; iterate-array >>
    {:^each; {:param; array-name :} key value >>
        {:array; value >>
            {:;key:}:
            {:^each; {:param; array-name :}->{:;key:} key1 value1 >>
                {:array; value1 >>
                    {:;key1:}:
                    {:^each; {:param; array-name :}->{:;key:}->{:;key1:} key2 value2 >>
                        {:array; value2 >>
                            {:;key2:}:
                            {:^each; {:param; array-name :}->{:;key:}->{:;key1:}->{:;key2:} key3 value3 >>
                                {:array; value3 >>
                                    {:;key3:}:
                                    {:^each; {:param; array-name :}->{:;key:}->{:;key1:}->{:;key2:}->{:;key3:} key4 value4 >>
                                        {:array; value4 >>
                                            {:;key4:}:
                                            {:^each; {:param; array-name :}->{:;key:}->{:;key1:}->{:;key2:}->{:;key3:}->{:;key4:} key5 value5 >>
                                                {:array; value5 >>
                                                    {:;key5:}:
                                                    {:;key5:}={:;value5:}
                                                :}{:else;
                                                    {:;key5:}={:;value5:}
                                                :}
                                            :}
                                        :}{:else;
                                            {:;key4:}={:;value4:}
                                        :}
                                    :}
                                :}{:else;
                                    {:;key3:}={:;value3:}
                                :}
                            :}
                        :}{:else;
                            {:;key2:}={:;value2:}
                        :}
                    :}
                :}{:else;
                    {:;key1:}={:;value1:}
                :}
            :}
        :}{:else;
            {:;key:}={:;value:}
        :}
    :}
:}
