import JobPanel from './index'
import JobItem from './JobItem/index'

export default {
  title: 'Jobs',
  component: JobPanel
}

export const Panel = () => ({
  components: { JobPanel },
  props: {
    jobs: {
      default: [
        {
          id: 1,
          title: 'Indexation of data',
          state: '5.29pm Jan 19, 2020',
          progress: 40
        },
        {
          id: 2,
          title: 'Connectivity analysis',
          state: '1.29am Jan 16, 2020',
          progress: 67
        },
        {
          id: 3,
          title: 'Model generation',
          state: '1.29am Jan 16, 2020',
          progress: 13
        }
      ]
    }
  },
  template: '<JobPanel :jobs="jobs" />'
})

export const Job = () => ({
  components: { JobItem },
  props: {
    title: {
      default: 'Indexation of data'
    },
    state: {
      default: '5.29pm Jan 19, 2020'
    },
    progress: {
      default: 60
    }
  },
  template: '<JobItem :state="state" :progress="progress" :title="title" />'
})
