import type { JSXElement } from 'solid-js';
import flexpatrolPreview from '../../assets/projects/flexpatrolPreview.png';
import gamesPreview from '../../assets/projects/gamesPreview.png';
import warframePreview from '../../assets/projects/warframePreview.png';
import worktimePreview from '../../assets/projects/worktimePreview.png';
import studybuddyPreview from '../../assets/projects/studybuddyPreview.png';
import mockupPreview from '../../assets/projects/mockupPreview.png';
import vkmutePreview from '../../assets/projects/vkmutePreview.png';
import musanthropePreview from '../../assets/projects/musanthropePreview.png';
import bakeryPreview from '../../assets/projects/bakeryPreview.png';
import sleepycarePreview from '../../assets/projects/sleepycarePreview.png';
import RecursivePreview from './RecursivePreview';

import {
  Icon, npm, extension, pwa, github
} from './iconList';

export class Project {
  name: string;
  preview: string | (() => JSXElement);
  link: string;
  repo?: string;
  npm?: string;
  descriptionSlug: string;
  previewStyle?: string;
  halfWidth?: boolean;
  icons?: Icon[];
  desktopOnly?: boolean;
  flip?: boolean;

  constructor(project: Project) {
    this.name = project.name
    this.preview = project.preview
    this.link = project.link
    this.repo = project.repo
    this.npm = project.npm
    this.descriptionSlug = project.descriptionSlug
    this.previewStyle = project.previewStyle
    this.halfWidth = project.halfWidth
    this.icons = project.icons
    this.desktopOnly = project.desktopOnly
    this.flip = project.flip
  }
}

export default [
  // new Project({
  //   name: 'Warframe Center',
  //   preview: warframePreview,
  //   link: 'https://warframe.center',
  //   descriptionSlug: 'warframe_desc'
  // }),
  new Project({
    name: 'Sleepy Care',
    preview: sleepycarePreview,
    link: 'https://sleepy.care',
    descriptionSlug: 'sleepycare_desc',
  }),
  new Project({
    name: 'Bakery',
    preview: bakeryPreview,
    link: 'https://bakery.kopyl.dev',
    repo: 'https://github.com/anatolykopyl/bakery',
    descriptionSlug: 'bakery_desc',
  }),
  new Project({
    name: 'Flexpatrol',
    preview: flexpatrolPreview,
    link: 'https://flexpatrol.ru',
    repo: 'https://github.com/anatolykopyl/worktime',
    descriptionSlug: 'flexpatrol_desc',
  }),
  new Project({
    name: 'Worktime',
    preview: worktimePreview,
    link: 'https://anatolykopyl.github.io/worktime',
    repo: 'https://github.com/anatolykopyl/worktime',
    descriptionSlug: 'worktime_desc',
    icons: [ pwa, github ]
  }),
  new Project({
    name: 'This website',
    preview: RecursivePreview,
    link: 'https://kopyl.dev',
    descriptionSlug: 'this_desc',
    desktopOnly: true
  }),
  new Project({
    name: 'VK Mute',
    preview: vkmutePreview,
    link: 'https://chrome.google.com/webstore/detail/vk-mute/mcnkfnjggkbenehgfelnnkklpkpjeibl',
    repo: 'https://github.com/anatolykopyl/vk-mute',
    descriptionSlug: 'vkmute_desc',
    halfWidth: true,
    icons: [ extension, github ]
  }),
  new Project({
    name: 'Vue 3D Mockup',
    preview: mockupPreview,
    link: 'https://anatolykopyl.github.io/vue-three-d-mockup/',
    repo: 'https://github.com/anatolykopyl/vue-three-d-mockup',
    npm: 'https://www.npmjs.com/package/vue-three-d-mockup',
    descriptionSlug: 'mockup_desc',
    halfWidth: true,
    icons: [ npm, github ]
    // previewStyle: 'position: absolute; height: 50%;'
  }),
  new Project({
    name: 'Musanthrope X PAYDAY 2',
    preview: musanthropePreview,
    link: 'https://musanthrope.kopyl.dev',
    descriptionSlug: 'musanthrope_desc',
    flip: true,
  }),
  new Project({
    name: 'Kopyl Games',
    preview: gamesPreview,
    link: 'https://games.kopyl.dev',
    descriptionSlug: 'games_desc',
    flip: true,
  }),
  // new Project({
  //   name: 'Studybuddy',
  //   preview: studybuddyPreview,
  //   link: 'https://studybuddy.top',
  //   descriptionSlug: 'studybuddy_desc'
  // }),
  // new Project({
  //   name: 'flexpatrol.ru',
  //   preview: flexpatrolPreview,
  //   link: 'https://flexpatrol.ru',
  //   descriptionSlug: 'flexpatrol_desc'
  // }),
]
