import { AppConfig } from '../types/blocks';
import { images } from '../assets';

export const homeScreenConfig: AppConfig = {
  homeScreen: {
    blocks: [
      {
        type: 'scrollableButtons',
        id: 'mainActions',
        buttons: [
          {
            id: 'invite',
            type: 'square',
            background: {
              type: 'gradient',
              colors: ['#FF69B4', '#FF1493']
            },
            title: 'Поделиться',
            imageUrl: images.ahareBot,
            action: {
              type: 'function',
              value: 'inviteFriends'
            }
          },
          {
            id: 'chooseStyle',
            type: 'square',
            background: {
              type: 'gradient',
              colors: ['#2B9CFF', '#1E88E5']
            },
            title: 'Инструкция',
            imageUrl: images.faq,
            action: {
              type: 'route',
              value: '/onboarding/welcome'
            }
          },
          {
            id: 'createPack',
            type: 'square',
            background: {
              type: 'gradient',
              colors: ['#8A2BE2', '#9400D3']
            },
            title: 'ShortsLoader',
            imageUrl: images.shorts,
            action: {
              type: 'function',
              value: 'openTelegramBot'
            }
          }
        ],
        style: {
          gap: 12,
          padding: 16,
          buttonSize: 120
        }
      },
      {
        type: 'divider',
        id: 'mainDivider',
        style: {
          margin: 0
        }
      },
      {
        type: 'stepTitle',
        id: 'step1',
        number: 1,
        text: 'Загрузи фото с лицом'
      },
      {
        type: 'uploadPhoto',
        id: 'photoUpload',
        style: {
          padding: "4px 16px 16px"
        }
      },
      {
        type: 'stepTitle',
        id: 'step2',
        number: 2,
        text: 'Выбери стиль'
      },
      {
        type: 'scrollableButtons',
        id: 'styleActions',
        buttons: [
          {
            id: 'chibi',
            type: 'square',
            background: {
              type: 'gradient',
              colors: ['#FF69B4', '#FF1493']
            },
            title: 'Чиби',
            imageUrl: images.balerina,
            action: {
              type: 'selectStyle',
              value: 'chibi'
            }
          },
          {
            id: 'emotions',
            type: 'square',
            background: {
              type: 'gradient',
              colors: ['#2B9CFF', '#1E88E5']
            },
            title: 'Эмоции',
            imageUrl: images.emotions,
            action: {
              type: 'selectStyle',
              value: 'emotions'
            },
            disabled: true
          },
          {
            id: 'realism',
            type: 'square',
            background: {
              type: 'gradient',
              colors: ['#4CAF50', '#45A049']
            },
            title: 'Реализм',
            imageUrl: images.realism,
            action: {
              type: 'selectStyle',
              value: 'realism'
            },
            disabled: true
          }
        ],
        style: {
          gap: 12,
          padding: "4px 16px 16px",
          buttonSize: 120
        }
      },
      {
        type: 'stepTitle',
        id: 'step3',
        number: 3,
        text: 'Выбери образ'
      },
      {
        type: 'textInput',
        id: 'customPrompt',
        style: {
          padding: "4px 16px 16px"
        }
      },
      {
        type: 'gridButtons',
        id: 'quickActions',
        buttons: [
          {
            id: 'customPrompt',
            type: 'square',
            background: {
              type: 'gradient',
              colors: ['#2196F3', '#1976D2']
            },
            title: 'Свой промпт',
            imageUrl: images.prompt,
            action: {
              type: 'function',
              value: 'toggleInput'
            }
          }
        ],
        style: {
          gap: 8,
          padding: "4px 8px 16px",
          buttonSize: 100,
          columns: 3
        }
      },
      {
        type: 'generateButton',
        id: 'generateStickers',
        tokenCount: 10
      }
    ]
  }
};
