import Vue from 'vue';


import "../baseStyle/index.scss";


import Button from './basic/Button';
import IconFont from './basic/IconFont';
import MediumFont from './basic/MediumFont';
import BoldFont from './basic/BoldFont';
import Link from './basic/Link';

import DataTable from './data/DataTable.vue';
import Pagination from './data/Pagination.vue';

import RingRoller from './effect/RingRoller.vue';
import SortIcon from './effect/SortIcon.vue';


import Touch from './external/Touch.vue';

import Checkbox from "./form/Checkbox";
import Input from './form/Input.vue';
import Radio from './form/Radio.vue';
import Select from './form/Select.vue';
import Sort from './form/Sort.vue';

import MyCircle from './graph/Circle';
import MyLine from './graph/Line';
import Ratings from './graph/Ratings';
import MyRect from './graph/Rect';
import Triangle from './graph/Triangle';

import Title from './layout/Title';
import Block from './layout/Block';
import FormRow from './layout/FormRow';
import FormItem from './layout/FormItem';
import MainContent from './layout/MainContent';
import RadioGroup from './layout/RadioGroup';


import Accordion from './navigator/Accordion';
import Breadcrumb from './navigator/Breadcrumb';
import Dropdown from './navigator/Dropdown';
import TabBar from './navigator/TabBar';

import Message from './notice/Message/message';
import Confirm from './notice/Confirm/confirm';

import SlideOver from './others/SlideOver';
import Dialog from './others/Dialog';
import MyImage from './others/Image';
import Popover from './others/Popover';
import TabChange from './others/TabChange'


const Components= {

    /* basic */
    Button,                                                 // 按钮
    IconFont,                                               // 矢量图标
    MediumFont,                                             // 稍粗的字
    BoldFont,                                               // 粗体字
    Link,                                                   // 链接

    /* data */
    DataTable,                                              // 表格
    Pagination,                                             // 分页组件

    /* effect */
    RingRoller,                                             // Loading效果，绕Z轴旋转的环
    SortIcon,                                               // 排序小Icon

    /* external */
    Touch,                                                  // 点击组件

    /* form */
    Checkbox,
    Input,
    Radio,
    Select,
    Sort,                                                   // 排序组件

    /* graph */
    MyCircle,                                               // 圆形
    MyLine,                                                 // 线
    Ratings,                                                // 评分（五角星）
    MyRect,                                                 // 矩形
    Triangle,                                               // 三角形

    /* layout */
    Block,                                                  // 块
    FormRow,                                                // 表单行
    FormItem,                                               // 表单元素
    MainContent,                                            // 主要块
    RadioGroup,                                             // 单选框组
    Title,                                                  // 标题（稍粗字体）

    /* navigator */
    Accordion,                                              // 手风琴
    Breadcrumb,                                             // 面包屑
    Dropdown,                                               // 下拉框
    TabBar,                                                 // 标签栏

    /* others */
    SlideOver,                                              // 侧拉框（默认从右侧出来）
    Dialog,                                                 // 对话框
    MyImage,                                                // 图片组件（留待以后使用）
    Popover,                                                // tips
    TabChange                                               // Tab切换

}

Object.keys(Components).forEach(name => {
    Vue.component('cox-'+name, Components[name]);
});
Vue.use(Confirm);
Vue.use(Message);

export {
    Button,IconFont,MediumFont,BoldFont,Link,
    DataTable,Pagination,
    RingRoller,Sort,
    Touch,
    Checkbox,Input,Radio,Select,SortIcon,
    MyCircle,MyLine,Ratings,MyRect,Triangle,
    Block,FormRow,FormItem,MainContent,RadioGroup,Title,
    Accordion,Breadcrumb,Dropdown,TabBar,
    Confirm,Message,
    SlideOver,Dialog,MyImage,Popover,TabChange
}
