<?php

use CRM_Calendar_ExtensionUtil as E;

return [
  'civicalendar_activity_types' => [
    'group_name' => 'CiviCalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar_activity_types',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => [],
    'description' => E::ts('Shows certain activity types on the calendar'),
    'html_type' => 'Select',
    'html_attributes' => [
      'size' => 20,
      'class' => 'crm-select2',
    ],
    'multiple' => true,
    'pseudoconstant' => ['optionGroupName' => 'activity_type'],
  ],

  'civicalendar_event_types' => [
    'group_name' => 'Civicalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar_event_types',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => [],
    'description' => E::ts('Shows certain event types on the calendar'),
    'html_type' => 'Select',
    'html_attributes' => [
      'size' => 20,
      'class' => 'crm-select2',
    ],
    'multiple' => true,
    'pseudoconstant' => ['optionGroupName' => 'event_type'],
  ],

  'civicalendar_case_types' => [
    'group_name' => 'Civicalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar__case_types',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => [],
    'description' => E::ts('Shows certain case types on the calendar'),
    'html_type' => 'Select',
    'html_attributes' => [
      'size' => 20,
      'class' => 'crm-select2',
    ],
    'multiple' => true,
    'option_values' => CRM_Case_PseudoConstant::caseType('title'),
  ],

  'civicalendar_scroll_time' => [
    'group_name' => 'CiviCalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar_scroll_time',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => '6:00:00',
    'description' => E::ts('Scroll pane is initially scrolled down to'),
    'html_type' => 'Select',
    'html_attributes' => [
      'size' => 20,
      'class' => 'crm-select2',
    ],
    'option_values' => [
      '0:00:00' => '12:00 am',
      '1:00:00' => '1:00 am',
      '2:00:00' => '2:00 am',
      '3:00:00' => '3:00 am',
      '4:00:00' => '4:00 am',
      '5:00:00' => '5:00 am',
      '6:00:00' => '6:00 am',
      '7:00:00' => '7:00 am',
      '8:00:00' => '8:00 am',
      '9:00:00' => '9:00 am',
      '10:00:00' => '10:00 am',
      '11:00:00' => '11:00 am',
      '12:00:00' => '12:00 pm',
      '13:00:00' => '1:00 pm',
      '14:00:00' => '2:00 pm',
      '15:00:00' => '3:00 pm',
      '16:00:00' => '4:00 pm',
      '17:00:00' => '5:00 pm',
      '18:00:00' => '6:00 pm',
      '19:00:00' => '7:00 pm',
      '20:00:00' => '8:00 pm',
      '21:00:00' => '9:00 pm',
      '22:00:00' => '10:00 pm',
      '23:00:00' => '11:00 pm',
    ],
  ],

  'civicalendar_default_view' => [
    'group_name' => 'CiviCalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar_default_view',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => 'month',
    'description' => E::ts('Default tab for calendar (month, week, day, agenda)'),
    'html_type' => 'Select',
    'html_attributes' => [
      'size' => 20,
      'class' => 'crm-select2',
    ],
    'option_values' => [
      'month' => E::ts('month'),
      'agendaWeek' => E::ts('week'),
      'agendaDay' => E::ts('day'),
      'listMonth' => E::ts('agenda'),
    ],
  ],

  'civicalendar_time_format' => [
    'group_name' => 'CiviCalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar_time_format',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => '(h:mm)t',
    'description' => E::ts('Time Format'),
    'html_type' => 'Select',
    'html_attributes' => [
      'size' => 20,
      'class' => 'crm-select2',
    ],
    'option_values' => [
      '(h:mm)t' => E::ts('5:00p'),
      'H:mm' => E::ts('17:00'),
    ],
  ],

  'civicalendar_include_contact_names_in_title' => [
    'group_name' => 'CiviCalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar_include_contact_names__in_title',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => '0',
    'description' => E::ts('Include contact names in title'),
    'html_type' => 'Checkbox',
  ],

  'civicalendar_hide_past_events' => [
    'group_name' => 'CiviCalendar Settings',
    'group' => 'civicalendar',
    'name' => 'civicalendar_hide_past_events',
    'type' => 'String',
    'add' => '4.7',
    'is_domain' => 1,
    'is_contact' => 0,
    'default' => '0',
    'description' => E::ts('Hide past events'),
    'html_type' => 'Checkbox',
  ],
];
