import { LineEdit, StandardListView, Button } from "std-widgets.slint";
import { Style } from "globals.slint";
import { IconButton } from "widgets/icon-button.slint";

export component UserSitesView inherits HorizontalLayout {
    padding: Style.spacing;
    spacing: Style.spacing;
    in property <[StandardListViewItem]> model <=> list_view_sites.model;
    in-out property <int> current-item <=> list_view_sites.current-item;
    callback pw_edited <=> line_edit_site_pw.edited;
    callback pw_accepted <=> line_edit_site_pw.accepted;
    VerticalLayout {
        spacing: Style.spacing;
        Text {
            text: "Send password for:";
        }

        line_edit_site_pw := LineEdit {
            input-type: InputType.text;
            placeholder-text: "example.org";
        }

        list_view_sites := StandardListView {
            model: [
                { text: "Test" },
                { text: "Test" },
            ];
        }
    }

    VerticalLayout {
        spacing: Style.spacing;
        // IconButton {
        //     icon: @image-url("images/log-out.svg");
        // }

        IconButton {
            icon: @image-url("images/sliders.svg");
        }

        IconButton {
            icon: @image-url("images/help-circle.svg");
        }

        IconButton {
            icon: @image-url("images/key.svg");
        }

        IconButton {
            icon: @image-url("images/trash-2.svg");
        }
    }
}
