const LogActions = (intl: any) => {
  return [
    //Alarm
    {
      title: intl.formatMessage({
        id: 'master.logs.things.alarm.confirm',
        defaultMessage: 'Alarm confirm',
      }),
      value: '0-0',
      selectable: false,
      children: [
        {
          value: 'things.alarm_confirm',
          title: intl.formatMessage({
            id: 'master.logs.things.confirm',
            defaultMessage: 'Confirm',
          }),
        },
        {
          value: 'things.alarm_unconfirm',
          title: intl.formatMessage({
            id: 'master.logs.things.unconfirm',
            defaultMessage: 'Unconfirm',
          }),
        },
      ],
    },
    //Things
    {
      title: intl.formatMessage({
        id: 'master.logs.things',
        defaultMessage: 'Things',
      }),
      value: '0-1',
      selectable: false,
      children: [
        {
          value: 'things.create',
          title: intl.formatMessage({
            id: 'master.logs.things.create',
            defaultMessage: 'Create new thing',
          }),
        },
        {
          value: 'things.update',
          title: intl.formatMessage({
            id: 'master.logs.things.update',
            defaultMessage: 'Update thing',
          }),
        },
        {
          value: 'things.remove',
          title: intl.formatMessage({
            id: 'master.logs.things.remove',
            defaultMessage: 'Remove thing',
          }),
        },
        {
          value: 'things.share',
          title: intl.formatMessage({
            id: 'master.logs.things.share',
            defaultMessage: 'Share thing',
          }),
        },
        {
          value: 'things.unshare',
          title: intl.formatMessage({
            id: 'master.logs.things.unshare',
            defaultMessage: 'Unshare thing',
          }),
        },
        {
          value: 'things.update_key',
          title: intl.formatMessage({
            id: 'master.logs.things.update_key',
            defaultMessage: 'Update key thing',
          }),
        },
      ],
    },
    // Users
    {
      title: intl.formatMessage({
        id: 'master.logs.users',
        defaultMessage: 'Users',
      }),
      value: '0-2',
      selectable: false,
      children: [
        {
          value: 'users.create',
          title: intl.formatMessage({
            id: 'master.logs.users.create',
            defaultMessage: 'Register user',
          }),
        },
        {
          value: 'users.update',
          title: intl.formatMessage({
            id: 'master.logs.users.update',
            defaultMessage: 'Update user',
          }),
        },
        {
          value: 'users.remove',
          title: intl.formatMessage({
            id: 'master.logs.users.remove',
            defaultMessage: 'Remove user',
          }),
        },
        {
          value: 'users.login',
          title: intl.formatMessage({
            id: 'master.logs.users.login',
            defaultMessage: 'User login',
          }),
        },
      ],
    },
    // Groups
    {
      title: intl.formatMessage({
        id: 'master.logs.groups',
        defaultMessage: 'Groups',
      }),
      value: '0-3',
      selectable: false,
      children: [
        {
          value: 'group.create',
          title: intl.formatMessage({
            id: 'master.logs.groups.create',
            defaultMessage: 'Create new group',
          }),
        },
        {
          value: 'group.update',
          title: intl.formatMessage({
            id: 'master.logs.groups.update',
            defaultMessage: 'Update group',
          }),
        },
        {
          value: 'group.remove',
          title: intl.formatMessage({
            id: 'master.logs.groups.remove',
            defaultMessage: 'Remove group',
          }),
        },
        {
          value: 'group.assign_thing',
          title: intl.formatMessage({
            id: 'master.logs.groups.assign_thing',
            defaultMessage: 'Assign thing to group',
          }),
        },
        {
          value: 'group.assign_user',
          title: intl.formatMessage({
            id: 'master.logs.groups.assign_user',
            defaultMessage: 'Assign user to group',
          }),
        },
        {
          value: 'group.unassign_thing',
          title: intl.formatMessage({
            id: 'master.logs.groups.unassign_thing',
            defaultMessage: 'Remove thing from group',
          }),
        },
        {
          value: 'group.unassign_user',
          title: intl.formatMessage({
            id: 'master.logs.groups.unassign_user',
            defaultMessage: 'Remove user from group',
          }),
        },
      ],
    },
    // Ships
    {
      title: intl.formatMessage({
        id: 'master.logs.ships',
        defaultMessage: 'Ships',
      }),
      value: '0-4',
      selectable: false,
      children: [
        {
          value: 'ships.create',
          title: intl.formatMessage({
            id: 'master.logs.ships.create',
            defaultMessage: 'Create new ship',
          }),
        },
        {
          value: 'ships.update',
          title: intl.formatMessage({
            id: 'master.logs.ships.update',
            defaultMessage: 'Update ship',
          }),
        },
        {
          value: 'ships.remove',
          title: intl.formatMessage({
            id: 'master.logs.ships.remove',
            defaultMessage: 'Remove ship',
          }),
        },
        {
          value: 'ships.assign_thing',
          title: intl.formatMessage({
            id: 'master.logs.ships.assign_thing',
            defaultMessage: 'Assign thing to ship',
          }),
        },
        {
          value: 'ships.assign_user',
          title: intl.formatMessage({
            id: 'master.logs.ships.assign_user',
            defaultMessage: 'Assign user to ship',
          }),
        },
        {
          value: 'ships.unassign_thing',
          title: intl.formatMessage({
            id: 'master.logs.ships.unassign_thing',
            defaultMessage: 'Remove thing from ship',
          }),
        },
        {
          value: 'ships.unassign_user',
          title: intl.formatMessage({
            id: 'master.logs.ships.unassign_user',
            defaultMessage: 'Remove user from ship',
          }),
        },
      ],
    },
    // Trips
    {
      title: intl.formatMessage({
        id: 'master.logs.trips',
        defaultMessage: 'Trips',
      }),
      value: '0-5',
      selectable: false,
      children: [
        {
          value: 'trips.create',
          title: intl.formatMessage({
            id: 'master.logs.trips.create',
            defaultMessage: 'Create new ship',
          }),
        },
        {
          value: 'trips.update',
          title: intl.formatMessage({
            id: 'master.logs.trips.update',
            defaultMessage: 'Update ship',
          }),
        },
        {
          value: 'trips.remove',
          title: intl.formatMessage({
            id: 'master.logs.trips.remove',
            defaultMessage: 'Remove ship',
          }),
        },
        {
          value: 'trips.approve',
          title: intl.formatMessage({
            id: 'master.logs.trips.approve',
            defaultMessage: 'Approve trip',
          }),
        },
        {
          value: 'trips.request_approve',
          title: intl.formatMessage({
            id: 'master.logs.trips.request_approve',
            defaultMessage: 'Request approval for trip',
          }),
        },
        {
          value: 'trips.unassign_thing',
          title: intl.formatMessage({
            id: 'master.logs.trips.unassign_thing',
            defaultMessage: 'Remove thing from ship',
          }),
        },
        {
          value: 'trips.unassign_user',
          title: intl.formatMessage({
            id: 'master.logs.trips.unassign_user',
            defaultMessage: 'Remove user from ship',
          }),
        },
      ],
    },
  ];
};

export default LogActions;
