// Mock data for Apps (Images)

export const apps = [
  {
    id: 'app-001',
    name: 'frappe-base',
    description: 'Base Frappe Framework image with ERPNext',
    currentVersion: 'v3.2.1',
    status: 'active',
    sitesCount: 35,
    lastUpdated: '2024-03-14',
    size: '4.2 GB',
  },
  {
    id: 'app-002',
    name: 'frappe-hrms',
    description: 'Frappe Framework with HRMS module',
    currentVersion: 'v2.1.0',
    status: 'active',
    sitesCount: 12,
    lastUpdated: '2024-03-10',
    size: '4.5 GB',
  },
  {
    id: 'app-003',
    name: 'frappe-crm',
    description: 'Frappe Framework with CRM module',
    currentVersion: 'v1.5.2',
    status: 'active',
    sitesCount: 8,
    lastUpdated: '2024-03-05',
    size: '4.1 GB',
  },
  {
    id: 'app-004',
    name: 'frappe-legacy',
    description: 'Legacy Frappe v13 for old projects',
    currentVersion: 'v1.0.5',
    status: 'deprecated',
    sitesCount: 2,
    lastUpdated: '2024-01-15',
    size: '3.8 GB',
  },
]

export const appVersions = [
  {
    version: 'v3.2.1',
    released: '2024-03-14',
    changelog: 'Security patches and bug fixes',
    status: 'current',
    sitesCount: 30,
  },
  {
    version: 'v3.2.0',
    released: '2024-03-01',
    changelog: 'New features: Multi-currency support, improved reports',
    status: 'active',
    sitesCount: 5,
  },
  {
    version: 'v3.1.0',
    released: '2024-02-15',
    changelog: 'Performance improvements',
    status: 'active',
    sitesCount: 3,
  },
  {
    version: 'v3.0.0',
    released: '2024-01-10',
    changelog: 'Major release with new UI',
    status: 'deprecated',
    sitesCount: 0,
  },
]

export const appConfig = `image:
  name: frappe-base
  distribution: debian
  release: bookworm
  architecture: amd64

source:
  downloader: debootstrap
  same_as: bookworm
  url: http://deb.debian.org/debian

targets:
  lxc:
    create_message: |
      Frappe Framework Container Ready
    config:
      - type: all
        content: |
          lxc.include = LXC_TEMPLATE_CONFIG/debian.common.conf

packages:
  manager: apt
  update: true
  cleanup: true
  sets:
    - packages:
        - curl
        - git
        - python3
        - python3-pip
        - nodejs
        - npm
        - mariadb-server
        - redis-server
        - nginx

actions:
  - trigger: post-packages
    action: |-
      #!/bin/bash
      set -eux
      pip3 install frappe-bench
      bench init --frappe-branch version-15 frappe-bench
`
