# coding: pyxl

import html
class A:
    def foo():
        lol = (<test_thing
                  test_something_whatever={{"aaaaaaaaaaaaaaaa": aaaaaaaaaaaaaaaa,
                                            "bbbbbbbbbbbbbbbb": lurrrr,
                                            "whatever": whatever,}}
               />)

        # Unfortunately black doesn't understand the real column
        # positions so does not wrap this
        foo = (<test_thing
                  test_something_whatever={["initialsomething",
                                            "bbbbbbbbbbbbbbbb",
                                            "whatever",
                                            "more args",]}
               />)

        baz = (<test_thing
                  test_something_whatever={foo("initialsomething",
                                               "bbbbbbbbbbbbbbbb",
                                               "whatever",
                                               "more args",
                                               "again",
                                               "asdf",)}
               />)

        lol("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", <foo>
                                                            <bar />
                                                        </foo>)

        a = (<testing>
                 hello {world}
             </testing>)

        b = (<testing>
                 hello {{"initialsomething": initialsomething,
                         "bbbbbbbbbbbbbbbb": lurrrr,
                         "whatever": whatever,}} world
             </testing>)

        indented_annoyingly = <frag>
            this is very popular...
        </frag>

        a = <frag>Im cool # lol
</frag>
        bc = <frag>
            {
                0 #lol
            }
            {{"aaaaaaaaaaaaaaaa": aaaaaaaaaaaaaaaa,
              "bbbbbbbbbbbbbbbb": lurrrr,
              "whatever": whatever,}}
        </frag>
        c = <frag>{0#lol
}</frag>

        placeholder_html = <div id={element_id} />.to_string()

        return (
            <foo>
                <bar baz="{baz}" spam="{spam}" eggs="{eggs}" />
            </foo>
        )

class B:
    def foo():
        text = (<t fill="{dict(lol_name=self.lol.name, something=0000000000000000000000, testing='i hate pyxl')}">
        </t>)

        return (<div class="something">
            {make_table((
                ("asdf", "lol"),
                ("welp", something),
                ("wrap", blah.blah.blah.blah.blah.blah),

            ))}
        </div>)

    def bar(self):
        return (
            <something
                class="foo"
            />  # type: ignore[arg-type]
        )
