import React from "react"; // lucide icons import { Columns, Grid3x3, Calendar, GanttChart, List } from "lucide-react"; // mobx react lite import { observer } from "mobx-react-lite"; // mobx store import { RootStore } from "store/root"; import { useMobxStore } from "lib/mobx/store-provider"; // types and default data import { TIssueLayouts } from "store/issue-views/issue_filters"; import { issueFilterVisibilityData } from "store/issue-views/issue_data"; export const LayoutSelection = observer(() => { const store: RootStore = useMobxStore(); const { issueFilters: issueFilterStore, issueView: issueStore } = store; const layoutSelectionFilters: { key: TIssueLayouts; title: string; icon: any }[] = [ { key: "list", title: "List", icon: List, }, { key: "kanban", title: "Kanban", icon: Grid3x3, }, { key: "calendar", title: "Calendar", icon: Calendar, }, { key: "spreadsheet", title: "Spreadsheet", icon: Columns, }, { key: "gantt_chart", title: "Gantt", icon: GanttChart, }, ]; const handleLayoutSectionVisibility = (layout_key: string) => issueFilterStore?.issueView && issueFilterVisibilityData[ issueFilterStore?.issueView === "my_issues" ? "my_issues" : "others" ].layout.includes(layout_key); const handleLayoutSelection = (_layoutKey: string) => { issueFilterStore.handleUserFilter("display_filters", "layout", _layoutKey); }; // console.log("----"); // console.log("my_user_id", issueFilterStore.myUserId); // console.log("workspace_id", issueFilterStore.workspaceId); // console.log("project_id", issueFilterStore.projectId); // console.log("module_id", issueFilterStore.moduleId); // console.log("cycle_id", issueFilterStore.cycleId); // console.log("view_id", issueFilterStore.viewId); // console.log("issue_view", issueFilterStore.issueView); // console.log("issue_layout", issueFilterStore.issueLayout); // console.log("user_filters", issueFilterStore.userFilters); // console.log("issues", issueStore.issues); // console.log("issues", issueStore.getIssues); // console.log("----"); return (