<?php

namespace Api\Controllers\Integration\Discord;

use Api\Core\Controller;
use PDO;

class SettingsController extends Controller
{
  public function get()
  {
    $settings = [
      'guildID' => moduleSettings('discord', 'guildID'),
      'roleSyncingStatus' => moduleSettings('discord', 'roleSyncingStatus') == '1',
      'setNicknameStatus' => moduleSettings('discord', 'setNicknameStatus') == '1',
      'syncedRoleID' => moduleSettings('discord', 'syncedRoleID'),
      'ticketStatus' => moduleSettings('discord', 'ticketStatus') == '1',
      'ticketCategoryID' => moduleSettings('discord', 'ticketCategoryID'),
      'ticketStaffRoleIDs' => [
        moduleSettings('discord', 'ticketStaffRoleID')
      ]
    ];

    response()->json($settings);
  }
}