# constants.py
#
# Copyright 2025 Pavel Baksy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Application Version
# Set at runtime by main.py from the version passed by the launcher script
VERSION = "0.0.0"  # Fallback for development/testing

# UI Layout Constants
UI_PANE_REQUEST_RESPONSE_POSITION = 510  # Initial position for request/response split
UI_PANE_RESPONSE_DETAILS_POSITION = 400  # Initial position for response body/headers split
UI_PANE_RESULTS_PANEL_POSITION = 120  # Initial position for script results panel
UI_PANE_SCRIPTS_POSITION = 300  # Initial position for scripts tab panes
UI_SCRIPT_RESULTS_PANEL_HEIGHT = 150  # Height reserved for script results panel
UI_TOAST_TIMEOUT_SECONDS = 3  # Duration to show toast notifications

# Debounce/Delay Timeouts (milliseconds)
DEBOUNCE_VARIABLE_INDICATORS_MS = 500  # Delay before updating variable indicators
DELAY_TAB_CREATION_MS = 50  # Delay before creating new tab after last one closes

# Data Display Limits
DISPLAY_VARIABLE_MAX_LENGTH = 50  # Max characters to display for variable values
DISPLAY_VARIABLE_TRUNCATE_SUFFIX = "..."  # Suffix for truncated variable values
DISPLAY_URL_NAME_MAX_LENGTH = 30  # Max characters for URL in generated tab names

# Data Storage Limits
HISTORY_MAX_ENTRIES = 100  # Maximum number of history entries to keep
PROJECT_NAME_MAX_LENGTH = 100  # Maximum length for project names
REQUEST_NAME_MAX_LENGTH = 200  # Maximum length for request names

# HTTP Client Settings
HTTP_DEFAULT_TIMEOUT_SECONDS = 30  # Default timeout for HTTP requests

# Script Execution Settings
SCRIPT_EXECUTION_TIMEOUT_SECONDS = 5  # Maximum execution time for scripts

# 36 symbolic icons for projects (6x6 grid)
PROJECT_ICONS = [
    # Row 1: Folders & Organization
    "folder-symbolic",
    "folder-open-symbolic",
    "folder-documents-symbolic",
    "folder-download-symbolic",
    "folder-music-symbolic",
    "folder-pictures-symbolic",

    # Row 2: Development & Code
    "application-x-executable-symbolic",
    "text-x-generic-symbolic",
    "text-x-script-symbolic",
    "utilities-terminal-symbolic",
    "package-x-generic-symbolic",
    "software-update-available-symbolic",

    # Row 3: Network & Web
    "network-server-symbolic",
    "network-wireless-symbolic",
    "network-workgroup-symbolic",
    "network-vpn-symbolic",
    "preferences-desktop-locale-symbolic",
    "web-browser-symbolic",

    # Row 4: Tools & Actions
    "document-edit-symbolic",
    "document-new-symbolic",
    "system-search-symbolic",
    "view-list-symbolic",
    "emblem-system-symbolic",
    "edit-find-symbolic",

    # Row 5: Objects & Concepts
    "starred-symbolic",
    "non-starred-symbolic",
    "bookmark-new-symbolic",
    "user-bookmarks-symbolic",
    "document-open-recent-symbolic",
    "mail-send-symbolic",

    # Row 6: Status & Symbols
    "emblem-ok-symbolic",
    "dialog-warning-symbolic",
    "dialog-information-symbolic",
    "security-high-symbolic",
    "changes-prevent-symbolic",
    "document-properties-symbolic",
]
