import { useRef } from "preact/hooks"
import { Edit } from "./apps/edit"
import { Window } from "./window"
import { Music } from "./apps/music";

export function Desktop() {
    const ref = useRef(null);
    return <div id="desktop" ref={ref}>
        <div class="icon_grid">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
        <Window title="README.txt" width="30vw" height={300} x={40} y={40} desktop={ref}>
            <Edit>
                Fine release by Sunnexo 2026&#10;
                &#10;
                Tracklist:&#10;
                  1.  Internet Exploder&#10;
                  2.  Netpunk (feat. Kasane Teto)&#10;
                  3.  Free Download&#10;
                  4.  I am not a Robot&#10;
                  5.  Content&#10;
                  6.  Keygen&#10;
                  7.  Base64&#10;
                  8.  Readme (feat. Kasane Teto)&#10;
                  9.  Symlink&#10;
                  10. Memory&#10;

                  An album about borrowing software forever.&#10;

                  A clumsy robot forgets about their girlfriend's anniversary, scrambling to find something to do for the date, eventually concluding they should watch a movie. Of course the movie is in high demand, so the tickets have sold out. Ultimately they resort to piracy, and things spiral out of control... &#10;
                  </Edit>
        </Window>
        <Window title="Stream Netpunk" desktop={ref}>
            <Music />
        </Window>

        <img id="netpunk" src="/assets/netpunk.png" />
    </div>
}
