// assets/js/tabs/tabsConfig.js

import { tabConfigRegistry } from "../core/registries.js";

const tabs = [

    {
        key: "sidebar",
        title: "منو",
        module: "core",
        view: "sidebar",
        icon: "dashicons-menu",
        fixed: true,
        order: 0
    },

    {
        key: "dashboard",
        title: "دشبورد",
        module: "core",
        view: "dashboard",
        icon: "dashicons-chart-bar",
        fixed: false,
        order: 1
    },

    {
        key: "users",
        title: "لیست کاربران",
        module: "users",
        view: "UsersListView",
        icon: "dashicons-groups",
        fixed: false,
        sortOrder: 10,
        persist: false
    },

    {
        key: "projectsAuo",
        title: "لیست پروژه‌ها",
        module: "projects",
        view: "ProjectsRuntimeView",
        icon: "dashicons-portfolio",
        fixed: false,
        sortOrder: 20,
        persist: false
    },

    {
        key: "cpm",
        title: "📊 کنترل پروژه",
        icon: "📊",
        fixed: false,
        persist: false
    },

    {
        key: "accounting",
        title: "📦 حسابداری",
        icon: "📦",
        fixed: false,
        persist: false
    },

    {
        key: "sales",
        title: "🧾 فروش",
        icon: "🧾",
        fixed: false,
        persist: false
    },

    {
        key: "purchase",
        title: "🛒 خرید",
        icon: "🛒",
        fixed: false,
        persist: false
    },

    {
        key: "payroll",
        title: "👨‍💼 حقوق",
        icon: "👨‍💼",
        fixed: false,
        persist: false
    },

    {
        key: "access",
        title: "🛡️ دسترسی‌ها",
        icon: "🛡️",
        fixed: false,
        persist: false
    },

    {
        key: "roleeditor",
        title: "🛡️ تب ویرایش دسترسی",
        icon: "🛡️",
        fixed: false,
        persist: false
    },

    {
        key: "basesetpermission",
        title: "🔐 Base Set Permissions",
        icon: "🔐",
        fixed: false,
        persist: false
    },

    {
        key: "tree",
        title: "🌳 درخت",
        view: "tree-view",
        icon: "🌳",
        fixed: false,
        persist: false
    },


    {
        key: "lands",
        title: "🌳 زمین",
        view: "lands-view",
        icon: "🌳",
        fixed: false,
        persist: false
    },

    {
        key: "manager",
        title: "📋 مدیریت وردپرس",
        view: "menu-manager-view", // نام کامپوننت ویو شما
        icon: "📋",
        fixed: false,
        persist: false,

    },

    {
        key: "gis",
        title: "🗺️ نقشه هوشمند",
        icon: "🗺️",
        fixed: false,
        persist: false
    },

    {
        key: "contracts",
        title: "📋 قراردادها",
        icon: "📋",
        fixed: false,
        persist: false
    },

    {
        key: "unitsales",
        title: "🏢 فروش واحد",
        icon: "🏢",
        fixed: false,
        persist: false
    },

    {
        key: "treasury",
        title: "💰 خزانه پروژه",
        icon: "💰",
        fixed: false,
        persist: false
    },

    {
        key: "permits",
        title: "📋 مجوزها",
        icon: "📋",
        fixed: false,
        persist: false
    },

    {
        key: "crm",
        title: "🎯 CRM",
        icon: "🎯",
        fixed: false,
        persist: false
    },

    {
        key: "inventory",
        title: "🏭 انبار",
        icon: "🏭",
        fixed: false,
        persist: false
    },

    {
        key: "acl",
        title: "🛡️ مدیریت دسترسی‌ها",
        icon: "🛡️",
        fixed: false,
        persist: false
    },

    {
        key: "hr",
        title: "👨‍💼 نیروی انسانی",
        icon: "👨‍💼",
        fixed: false,
        persist: false
    },

    {
        key: "shipping",
        title: "🚚 حمل و نقل",
        icon: "🚚",
        fixed: false,
        persist: false
    },

    {
        key: "assets",
        title: "🏢 مدیریت اموال",
        icon: "🏢",
        fixed: false,
        persist: false
    },

    {
        key: "commission",
        title: "🔨 کمیسیون ماده ۱۰۰",
        icon: "🔨",
        fixed: false,
        persist: false
    },

    {
        key: "workflow",
        title: "🔄 Workflow پروژه‌ها",
        icon: "🔄",
        fixed: false,
        persist: false
    },

    {
        key: "wpproducts",
        title: "🛍️ محصولات فروشگاه",
        icon: "🛍️",
        fixed: false,
        persist: false
    },
    {
        key: "chat",
        title: "💬 چت و پشتیبانی",
        icon: "💬",
        fixed: false,
        persist: false
    },

    {
        key: "service",
        title: "🔧 خدمات میدانی",
        icon: "🔧",
        fixed: false,
        persist: false
    },

    {
        key: "realestate",
        title: "🏘️ داشبورد املاک",
        icon: "🏘️",
        fixed: false,
        persist: false
    },

    {
        key: "usedash",
        title: "🧭 داشبورد کاربری",
        icon: "🧭",
        fixed: false,
        persist: false
    },

    {
        key: "projects-manager",
        title: "📁 مدیریت پروژه‌ها",
        icon: "📁",
        fixed: false,
        persist: false
    },

    {
        key: "eqtesad_melk",
        title: "🏛️ اقتصاد ملک",
        icon: "🏛️",
        fixed: false,
        persist: false
    }

];

// ثبت همه تب‌ها
tabs.forEach(tab => tabConfigRegistry.register(tab));
