import React, {HTMLAttributes} from "react";
import {classList} from "spotlight/utils/jsx/classes";

export const Dashicon = ({icon, className, ...rest}: Props) => (
    <span className={classList("dashicons", "dashicons-" + icon, className)} {...rest} />
);

export interface Props extends HTMLAttributes<HTMLSpanElement> {
    icon: DashiconTy;
}

export type DashiconTy =
    "menu"
    | "menu-alt"
    | "menu-alt2"
    | "menu-alt3"
    | "admin-site"
    | "admin-site-alt"
    | "admin-site-alt2"
    | "admin-site-alt3"
    | "dashboard"
    | "admin-post"
    | "admin-media"
    | "admin-links"
    | "admin-page"
    | "admin-comments"
    | "admin-appearance"
    | "admin-plugins"
    | "plugins-checked"
    | "admin-users"
    | "admin-tools"
    | "admin-settings"
    | "admin-network"
    | "admin-home"
    | "admin-generic"
    | "admin-collapse"
    | "filter"
    | "admin-customizer"
    | "admin-multisite"
    | "welcome-write-blog"
    | "welcome-add-page"
    | "welcome-view-site"
    | "welcome-widgets-menus"
    | "welcome-comments"
    | "welcome-learn-more"
    | "format-aside"
    | "format-image"
    | "format-gallery"
    | "format-video"
    | "format-status"
    | "format-quote"
    | "format-chat"
    | "format-audio"
    | "camera"
    | "camera-alt"
    | "images-alt"
    | "images-alt2"
    | "video-alt"
    | "video-alt2"
    | "video-alt3"
    | "media-archive"
    | "media-audio"
    | "media-code"
    | "media-default"
    | "media-document"
    | "media-interactive"
    | "media-spreadsheet"
    | "media-text"
    | "media-video"
    | "playlist-audio"
    | "playlist-video"
    | "controls-play"
    | "controls-pause"
    | "controls-forward"
    | "controls-skipforward"
    | "controls-back"
    | "controls-skipback"
    | "controls-repeat"
    | "controls-volumeon"
    | "controls-volumeoff"
    | "image-crop"
    | "image-rotate"
    | "image-rotate-left"
    | "image-rotate-right"
    | "image-flip-vertical"
    | "image-flip-horizontal"
    | "image-filter"
    | "undo"
    | "redo"
    | "editor-bold"
    | "editor-italic"
    | "editor-ul"
    | "editor-ol"
    | "editor-ol-rtl"
    | "editor-quote"
    | "editor-alignleft"
    | "editor-aligncenter"
    | "editor-alignright"
    | "editor-insertmore"
    | "editor-spellcheck"
    | "editor-expand"
    | "editor-contract"
    | "editor-kitchensink"
    | "editor-underline"
    | "editor-justify"
    | "editor-textcolor"
    | "editor-paste-word"
    | "editor-paste-text"
    | "editor-removeformatting"
    | "editor-video"
    | "editor-customchar"
    | "editor-outdent"
    | "editor-indent"
    | "editor-help"
    | "editor-strikethrough"
    | "editor-unlink"
    | "editor-rtl"
    | "editor-ltr"
    | "editor-break"
    | "editor-code"
    | "editor-paragraph"
    | "editor-table"
    | "align-left"
    | "align-right"
    | "align-center"
    | "align-none"
    | "lock"
    | "unlock"
    | "calendar"
    | "calendar-alt"
    | "visibility"
    | "hidden"
    | "post-status"
    | "edit"
    | "trash"
    | "sticky"
    | "external"
    | "arrow-up"
    | "arrow-down"
    | "arrow-right"
    | "arrow-left"
    | "arrow-up-alt"
    | "arrow-down-alt"
    | "arrow-right-alt"
    | "arrow-left-alt"
    | "arrow-up-alt2"
    | "arrow-down-alt2"
    | "arrow-right-alt2"
    | "arrow-left-alt2"
    | "sort"
    | "leftright"
    | "randomize"
    | "list-view"
    | "excerpt-view"
    | "grid-view"
    | "move"
    | "share"
    | "share-alt"
    | "share-alt2"
    | "twitter"
    | "rss"
    | "email"
    | "email-alt"
    | "email-alt2"
    | "facebook"
    | "facebook-alt"
    | "googleplus"
    | "networking"
    | "instagram"
    | "hammer"
    | "art"
    | "migrate"
    | "performance"
    | "universal-access"
    | "universal-access-alt"
    | "tickets"
    | "nametag"
    | "clipboard"
    | "heart"
    | "megaphone"
    | "schedule"
    | "tide"
    | "rest-api"
    | "code-standards"
    | "buddicons-activity"
    | "buddicons-bbpress-logo"
    | "buddicons-buddypress-logo"
    | "buddicons-community"
    | "buddicons-forums"
    | "buddicons-friends"
    | "buddicons-groups"
    | "buddicons-pm"
    | "buddicons-replies"
    | "buddicons-topics"
    | "buddicons-tracking"
    | "wordpress"
    | "wordpress-alt"
    | "pressthis"
    | "update"
    | "update-alt"
    | "screenoptions"
    | "info"
    | "cart"
    | "feedback"
    | "cloud"
    | "translation"
    | "tag"
    | "category"
    | "archive"
    | "tagcloud"
    | "text"
    | "yes"
    | "yes-alt"
    | "no"
    | "no-alt"
    | "plus"
    | "plus-alt"
    | "plus-alt2"
    | "minus"
    | "dismiss"
    | "marker"
    | "star-filled"
    | "star-half"
    | "star-empty"
    | "flag"
    | "warning"
    | "location"
    | "location-alt"
    | "vault"
    | "shield"
    | "shield-alt"
    | "sos"
    | "search"
    | "slides"
    | "text-page"
    | "analytics"
    | "chart-pie"
    | "chart-bar"
    | "chart-line"
    | "chart-area"
    | "groups"
    | "businessman"
    | "businesswoman"
    | "businessperson"
    | "id"
    | "id-alt"
    | "products"
    | "awards"
    | "forms"
    | "testimonial"
    | "portfolio"
    | "book"
    | "book-alt"
    | "download"
    | "upload"
    | "backup"
    | "clock"
    | "lightbulb"
    | "microphone"
    | "desktop"
    | "laptop"
    | "tablet"
    | "smartphone"
    | "phone"
    | "index-card"
    | "carrot"
    | "building"
    | "store"
    | "album"
    | "palmtree"
    | "tickets-alt"
    | "money"
    | "smiley"
    | "thumbs-up"
    | "thumbs-down"
    | "layout"
    | "paperclip"
    | "database"
    | "database-add"
    | "database-remove"
    | "database-view"
    | "database-import"
    | "database-export"
;
