use std::{io, path::PathBuf};

use crate::{Dance, LaunchKind, LocItem};

impl Dance {
    pub fn get_json(&mut self) -> io::Result<()> {
        self.loc_list.items.push(LocItem {
            alias: String::from("dance"),
            path: PathBuf::from("~/dev/rust/dance"),
            lkind: LaunchKind::Cd,
            selected: false,
            filter: false,
            access_scr: 0,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("readme"),
            path: PathBuf::from("~/dev/rust/dance/README.md"),
            lkind: LaunchKind::Edit,
            selected: false,
            filter: false,
            access_scr: 11,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("notes"),
            path: PathBuf::from("~/dev/rust/dance/notes.md"),
            lkind: LaunchKind::Edit,
            selected: false,
            filter: false,
            access_scr: 1,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("photograpy"),
            path: PathBuf::from("~/Pictures"),
            lkind: LaunchKind::Cd,
            selected: false,
            filter: false,
            access_scr: 2,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("music"),
            path: PathBuf::from("~/Desktop/music"),
            lkind: LaunchKind::Cd,
            selected: false,
            filter: false,
            access_scr: 3,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("archives"),
            path: PathBuf::from("~/Documents/history/archives"),
            lkind: LaunchKind::Cd,
            selected: false,
            filter: false,
            access_scr: 4,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("dev"),
            path: PathBuf::from("~/dev"),
            lkind: LaunchKind::Cd,
            selected: false,
            filter: false,
            access_scr: 5,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("image"),
            path: PathBuf::from("~/Downloads/IMG_5387.HEIC"),
            lkind: LaunchKind::Open,
            selected: false,
            filter: false,
            access_scr: 7,
        });

        self.loc_list.items.push(LocItem {
            alias: String::from("dotfiles"),
            path: PathBuf::from("~/dotfiles"),
            lkind: LaunchKind::Cd,
            selected: false,
            filter: false,
            access_scr: 6,
        });

        Ok(())
    }
}
