<?php

class icons
{

  private static function iconclass($i)
  {
    $icons = array(
      "app" => "fab fa-app-store",
      "web" => "fas fa-globe-africa",
      "info" => "fa-solid fa-info-circle",
      "id" => "fas fa-hashtag",
      "username" => "fa fa-info",
      "password" => "fa fa-key",
      "login" => "fas fa-sign-in-alt",
      "logout" => "fas fa-power-off",
      "register" => "fas fa-user-plus",
      "profile" => "fas fa-user-circle",
      "phonebook" => "far fa-address-book",
      "money" => "fas fa-dollar-sign",
      "delete" => "fas fa-times",
      "search" => "fas fa-search",
      "user" => "far fa-user",
      "users" => "fas fa-users",
      "capacity" => "fas fa-users",
      "publication" => "far fa-bookmark",
      "plus" => "fas fa-plus",
      "minus" => "fas fa-minus",
      "car" => "fas fa-taxi",
      "contact" => "fas fa-address-card",
      "mail" => "far fa-envelope",
      "sms" => "fas fa-sms",
      "view" => "fas fa-eye",
      "hidden" => "fa-solid fa-eye-slash",
      "phone" => "fa-solid fa-phone",
      "call" => "fas fa-phone-alt",
      "forward" => "fa-solid fa-chevron-right",
      "star" => "fas fa-star",
      "back" => "fa-solid fa-arrow-left",
      "date" => "far fa-calendar-alt",
      "time" => "far fa-clock",
      "notice" => "far fa-comment-alt",
      "home" => "fas fa-home",
      "location" => "fas fa-map-marker-alt",
      "edit" => "fas fa-pencil-alt",
      "bars" => "fas fa-bars",
      "list" => "far fa-list-alt",
      "dropoff" => "fas fa-long-arrow-alt-right",
      "return" => "fas fa-exchange-alt",
      "distance" => "fas fa-arrows-h",
      "state" => "fas fa-asterisk",
      "pending" => "fas fa-exclamation-circle",
      "confirmed" => "fas fa-check",
      "active" => "fas fa-sync-alt",
      "completed" => "fas fa-check-double",
      "map" => "fas fa-map-marked-alt",
      "verified" => "fas fa-check-circle",
      "loading" => "fas fa-spinner",
      "load" => "fas fa-sync-alt",
      "warning" => "fas fa-exclamation-triangle",
      "password" => "fas fa-key",
      "country" => "fas fa-globe-africa",
      "log" => "fas fa-list-ul",
      "picture" => "fa-solid fa-image",
      "copy" => "far fa-copy",
      "error" => "fa-solid fa-circle-xmark",
      "orgchart" => "fa-solid fa-sitemap",
      "whatsapp" => "fab fa-whatsapp",
      "settings" => "fas fa-cog",
      "theme" => "fas fa-palette",
      "link" => "fas fa-link",
      "hash" => "fas fa-hashtag",
      "born" => "fas fa-birthday-cake",
      "online" => "fas fa-satellite-dish",
      "tools" => "fas fa-tools",
      "balance" => "fas fa-balance-scale",
      "downloads" => "fas fa-download",
      "history" => "fas fa-history",
      "hourglass" => "fas fa-hourglass-half",
      "quote-left" => "fas fa-quote-left",
      "quote-right" => "fas fa-quote-right",
      "sort" => "fas fa-sort-amount-down-alt",
      "notifications" => "far fa-bell",
      "menu" => "fas fa-bars",
      "news" => "fas fa-newspaper",
      "stats"  => "far fa-chart-bar",
      "pdf" => "far fa-file-pdf",
      "jpg" => "far fa-file-image",
      "question" => "fas fa-question",
      "updated" => "fas fa-check-circle",
      "success" => "fa-solid fa-circle-check",
      "facebook"  => "fab fa-facebook",
      "whatsapp"  =>  "fab fa-whatsapp",
      "announcement" => "fa-solid fa-bullhorn",
      "external-link" => "fas fa-external-link-alt",
      "email" => "fas fa-at",
      "institution" => "fas fa-landmark",
      "dcs-ad" => "fas fa-landmark",
      "dcs-pl" => "fas fa-chart-line",
      "dcs-pt" => "fas fa-users",
      "dcs-fi" => "fa-solid fa-coins",
      "dcs-en" => "fas fa-hammer",
      "circular" => "far fa-file-alt",
      "files" => "far fa-file-alt",
      "download" => "fas fa-arrow-down",
      "text" => "fas fa-font",
      "content" => "fas fa-paragraph",
      "publisher" => "fas fa-pen-alt",
      "light" => "fas fa-sun",
      "dark" => "fas fa-moon",
      "statute" => "fas fa-gavel",
      "scholarship" => "fas fa-graduation-cap",
      "institution" => "fas fa-landmark",
      "admin" => "fa-solid fa-gear",
      "form" => "fa-solid fa-file-lines",
      "arrow-down" => "fa-solid fa-angle-down",
      "under-construction" => "fa-solid fa-person-digging",
      "places" => "far fa-building",
      "song" => "fa-solid fa-music",
      "hsep" => "fa-solid fa-house-medical"
    );

    return isset($icons[$i]) ? $icons[$i] : "";
  }

  private static function animateclass($a)
  {
    $animations = array(
      "beat" => "fa-beat",
      "fade" => "fa-fade",
      "beat-fade" => "fa-beat-fade",
      "shake" => "fa-shake",
      "spin" => "fa-spin"
    );

    return isset($animations[$a]) ? $animations[$a] : "";
  }

  public static function get($i, $a = "none")
  {
    return '<i class="' . self::iconclass($i) . ' ' . self::animateclass($a) . ' icon"></i>';
  }
}
