-- @gsc/web-kit nav.apps canonical seed (apply verbatim, never edit)
--
-- Replicated into every app's nav.apps table so the "browse apps" panel
-- shows the same canonical list everywhere. Updates flow via kit version
-- bumps: re-copy this file into each app's migrations directory and re-apply.
--
-- ON CONFLICT (key) DO UPDATE keeps the canonical list in sync — any local
-- edits to these rows will be overwritten on next apply. Add new apps by
-- editing this file in the kit and bumping the kit's minor version.

INSERT INTO nav.apps (key, name, description, url, icon_class, icon_url, icon_bg, sort_order, enabled)
VALUES
    ('gsc-crm',          'CRM',                    'Customer relationship management',         'https://crm.gosec.internal',     NULL,             'https://assets.gosec.cloud/logos/crm.svg',     NULL,                10, TRUE),
    ('gsc-chronos',      'Chronos',                'Time tracking and timesheets',             'https://chronos.gosec.internal', NULL,             'https://assets.gosec.cloud/logos/chronos.svg', NULL,                20, TRUE),
    ('gsc-meet',         'GSC Meet',               'Video conferencing with AI features',      '/apps/gsc-meet',                 NULL,             '/images/demo/logos/1.svg',                     NULL,                30, TRUE),
    ('gsc-voice',        'Voice',                  'PBX and telephony management',             '/apps/gsc-voice',                'ph-phone',       NULL,                                           'bg-primary-lt',     40, TRUE),
    ('gsc-ai-hub',       'AI Hub',                 'AI models and services management',        '/apps/gsc-ai-hub',               NULL,             '/images/demo/logos/2.svg',                     NULL,                50, TRUE),
    ('gsc-surveillance', 'Surveillance',           'Video surveillance and security',          '/apps/surveillance',             NULL,             '/images/demo/logos/3.svg',                     NULL,                60, TRUE),
    ('gsc-archive',      'Archive',                'Email archiving and eDiscovery',           '/apps/gsc-archive',              'ph-archive-box', NULL,                                           'bg-info-lt',        70, TRUE),
    ('gsc-dam',          'Digital Asset Manager',  'Media and asset management platform',      '/apps/gsc-dam',                  NULL,             '/images/demo/logos/4.svg',                     NULL,                80, TRUE)
ON CONFLICT (key) DO UPDATE
    SET name         = EXCLUDED.name,
        description  = EXCLUDED.description,
        url          = EXCLUDED.url,
        icon_class   = EXCLUDED.icon_class,
        icon_url     = EXCLUDED.icon_url,
        icon_bg      = EXCLUDED.icon_bg,
        sort_order   = EXCLUDED.sort_order,
        enabled      = EXCLUDED.enabled,
        updated_at   = NOW();
