/* This file is part of DarkFi (https://dark.fi)
 *
 * Copyright (C) 2020-2026 Dyne.org foundation
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

use crate::{
    mesh::Color,
    ui::{ShapeVertex, VectorShape},
};
pub fn create_settings(color: Color) -> VectorShape {
    VectorShape {
        verts: vec![
            ShapeVertex::from_xy(-0.282843, 0.0, color),
            ShapeVertex::from_xy(0.0, 0.282843, color),
            ShapeVertex::from_xy(-0.0, -0.282843, color),
            ShapeVertex::from_xy(0.282843, -0.0, color),
            ShapeVertex::from_xy(-0.05, 1.0, color),
            ShapeVertex::from_xy(0.05, 0.9, color),
            ShapeVertex::from_xy(-0.05, -0.9, color),
            ShapeVertex::from_xy(0.05, -1.0, color),
            ShapeVertex::from_xy(-0.05, -0.335, color),
            ShapeVertex::from_xy(0.05, -0.335, color),
            ShapeVertex::from_xy(0.0, 0.95, color),
            ShapeVertex::from_xy(-0.0, -0.95, color),
            ShapeVertex::from_xy(-0.0, -0.385, color),
            ShapeVertex::from_xy(-0.05, 0.3315, color),
            ShapeVertex::from_xy(0.05, 0.3315, color),
            ShapeVertex::from_xy(0.0, 0.3815, color),
            ShapeVertex::from_xy(-0.982843, 0.45, color),
            ShapeVertex::from_xy(-0.7, 0.732843, color),
            ShapeVertex::from_xy(-0.7, 0.167157, color),
            ShapeVertex::from_xy(-0.417157, 0.45, color),
            ShapeVertex::from_xy(-0.75, 1.0, color),
            ShapeVertex::from_xy(-0.65, 0.9, color),
            ShapeVertex::from_xy(-0.75, -0.9, color),
            ShapeVertex::from_xy(-0.65, -1.0, color),
            ShapeVertex::from_xy(-0.75, 0.115, color),
            ShapeVertex::from_xy(-0.65, 0.115, color),
            ShapeVertex::from_xy(-0.7, 0.95, color),
            ShapeVertex::from_xy(-0.7, -0.95, color),
            ShapeVertex::from_xy(-0.7, 0.065, color),
            ShapeVertex::from_xy(-0.75, 0.7815, color),
            ShapeVertex::from_xy(-0.65, 0.7815, color),
            ShapeVertex::from_xy(-0.7, 0.8315, color),
            ShapeVertex::from_xy(0.417157, -0.45, color),
            ShapeVertex::from_xy(0.7, -0.167157, color),
            ShapeVertex::from_xy(0.7, -0.732843, color),
            ShapeVertex::from_xy(0.982843, -0.45, color),
            ShapeVertex::from_xy(0.65, 1.0, color),
            ShapeVertex::from_xy(0.75, 0.9, color),
            ShapeVertex::from_xy(0.65, -0.9, color),
            ShapeVertex::from_xy(0.75, -1.0, color),
            ShapeVertex::from_xy(0.65, -0.785, color),
            ShapeVertex::from_xy(0.75, -0.785, color),
            ShapeVertex::from_xy(0.7, 0.95, color),
            ShapeVertex::from_xy(0.7, -0.95, color),
            ShapeVertex::from_xy(0.7, -0.835, color),
            ShapeVertex::from_xy(0.65, -0.1185, color),
            ShapeVertex::from_xy(0.75, -0.1185, color),
            ShapeVertex::from_xy(0.7, -0.0685, color),
            ShapeVertex::from_xy(-0.869706, 0.45, color),
            ShapeVertex::from_xy(-0.7, 0.619706, color),
            ShapeVertex::from_xy(-0.7, 0.280294, color),
            ShapeVertex::from_xy(-0.530294, 0.45, color),
            ShapeVertex::from_xy(0.530294, -0.45, color),
            ShapeVertex::from_xy(0.7, -0.280294, color),
            ShapeVertex::from_xy(0.7, -0.619706, color),
            ShapeVertex::from_xy(0.869706, -0.45, color),
            ShapeVertex::from_xy(-0.169706, 0.0, color),
            ShapeVertex::from_xy(0.0, 0.169706, color),
            ShapeVertex::from_xy(-0.0, -0.169706, color),
            ShapeVertex::from_xy(0.169706, -0.0, color),
        ],
        indices: vec![
            0, 58, 2, 9, 11, 12, 12, 6, 8, 10, 13, 4, 5, 15, 10, 18, 48, 50, 28, 23, 27, 28, 22,
            24, 26, 29, 20, 21, 31, 26, 33, 52, 32, 41, 43, 44, 44, 38, 40, 36, 47, 45, 37, 47, 42,
            3, 57, 1, 9, 7, 11, 12, 11, 6, 10, 15, 13, 5, 14, 15, 19, 49, 17, 28, 25, 23, 28, 27,
            22, 26, 31, 29, 21, 30, 31, 34, 55, 35, 41, 39, 43, 44, 43, 38, 36, 42, 47, 37, 46, 47,
            18, 51, 19, 17, 48, 16, 33, 55, 53, 32, 54, 34, 2, 59, 3, 1, 56, 0, 0, 56, 58, 18, 16,
            48, 33, 53, 52, 3, 59, 57, 19, 51, 49, 34, 54, 55, 18, 50, 51, 17, 49, 48, 33, 35, 55,
            32, 52, 54, 2, 58, 59, 1, 57, 56,
        ],
    }
}

pub fn create_right_border(color: Color) -> VectorShape {
    VectorShape {
        verts: vec![
            ShapeVertex::from_xy(-0.4, 1.0, color),
            ShapeVertex::from_xy(0.5, 0.0, color),
            ShapeVertex::from_xy(-0.4, -1.0, color),
            ShapeVertex::from_xy(-0.5, 1.0, color),
            ShapeVertex::from_xy(-0.5, 0.0, color),
            ShapeVertex::from_xy(-0.5, -1.0, color),
            ShapeVertex::from_xy(0.1, 1.0, color),
            ShapeVertex::from_xy(1.0, 0.0, color),
            ShapeVertex::from_xy(0.1, -1.0, color),
            ShapeVertex::from_xy(-0.1, 1.0, color),
            ShapeVertex::from_xy(0.8, 0.0, color),
            ShapeVertex::from_xy(-0.1, -1.0, color),
        ],
        indices: vec![2, 4, 1, 0, 4, 3, 2, 5, 4, 0, 1, 4, 8, 10, 7, 6, 10, 9, 8, 11, 10, 6, 7, 10],
    }
}
