class Configuration {
  static instance = null;

  static getInstance() {
    if (this.instance == null) {
      this.instance = new Configuration();
    }
    return this.instance;
  }

  get is_debug() {
    return false;
  }

  get ajax_url() {
    return window.ajaxurl;
  }

  get categories() {
    let cats = []
    for (let i=0; i<10; i++) {
      cats.push({value: 'cat'+i, label: 'Category '+i})
    }
    return cats
  }

  get selectedCategories()
  {
    return window.dreamfox_wdd_params['categories'];
  }

  get commonSettings()
  {
    return {
      deliveryDays: 100,
    }
  }

  get otherSettings()
  {
    return {
      required: false,
      showEmptyOnCheckout: true,
      labelOnCheckout: 'labelOnCheckout',
      descriptionOnCheckout: 'descriptionOnCheckout',
    }
  }

  get categorySettings()
  {
    return [
      {id: 1, name: 'Cat 1', selected: false, days: 10},
      {id: 2, name: 'Cat 2', selected: true, days: 20},
    ]
  }

  get holidaySettings()
  {
    return {
      countOnlyWorkingDays: false,
      disableDays: [
        {id: 2, label: 'Monday', checked: false},
        {id: 3, label: 'Tuesday', checked: false},
        {id: 4, label: 'Wednesday', checked: false},
        {id: 5, label: 'Thursday', checked: false},
        {id: 6, label: 'Friday', checked: false},
        {id: 7, label: 'Saturday', checked: false},
        {id: 1, label: 'Sunday', checked: false},
      ],
      holidays: [
        {id: 1, label: 'I]', startDate: '', endDate: ''},
        {id: 2, label: 'II]', startDate: '', endDate: ''},
        {id: 3, label: 'III]', startDate: '', endDate: ''},
        {id: 4, label: 'IV]', startDate: '', endDate: ''},
        {id: 5, label: 'V]', startDate: '', endDate: ''},
      ],
    }
  }
}

export default Configuration