/**
 * @author xiangyu.wu
 * @param { components } 所有组件引入后加入该数组，进行全局安装的循环
 * @param { install } 安装方法
 */

import PsText from './basicsComponent/text/index';
import PsButton from './basicsComponent/button/index';
import PsInput from './basicsComponent/input/index';
import PsInputNumber from './basicsComponent/inputNumber/index';
import PsSelect from './basicsComponent/select/index';
import PsCascader from './basicsComponent/cascader/index';
import PsCheckbox from './basicsComponent/checkbox/index';
import PsRadio from './basicsComponent/radio/index';
import PsSwitch from './basicsComponent/switch/index';
import PsTooltip from './basicsComponent/tooltip/index';

import PsTimePicker from './basicsComponent/timePicker/index';
import PsDatePicker from './basicsComponent/datePicker/index';
import PsDatetimePicker from './basicsComponent/datetimePicker/index';

import PsUploadImage from './basicsComponent/uploadImage/index';
import PsUploadFile from './basicsComponent/uploadFile/index';
import PsDialog from './basicsComponent/dialog/index';
import PsForm from './basicsComponent/form/index';
import PsFormItem from './basicsComponent/formItem/index';

import PsPagination from './basicsComponent/pagination/index';
import PsTable from './basicsComponent/table/index';
import PsTag from './basicsComponent/tags/index';

import PsTabs from './basicsComponent/tabs/index';
import PsTableColumn from './basicsComponent/tableColumn/index';

import PsDropdown from './basicsComponent/dropdown/index';
import PsImage from './basicsComponent/image/index';
import PsDrawer from './basicsComponent/drawer/index';

// 业务组件库


import psTitle from './businessComponent/title/index';
import PsInformation from './businessComponent/information/index';
import PsInformationItem from './businessComponent/informationItem/index';
import PsSearch from './businessComponent/search/index';
import PsSidebar from './businessComponent/sidebar/index';
import PsDetail from './businessComponent/detail/index';
import PsDetailItem from './businessComponent/detailItem/index';
import PsBlock from './businessComponent/block/index';


// echarts组件
import PsCharts from './echartsComponent/charts/index';








import './style/default.css';
import './style/install.css';

const components = [
    PsText,
    PsButton,
    PsInput,
    PsInputNumber,
    PsSelect,
    PsCheckbox,
    PsPagination,
    PsRadio,
    PsSwitch,
    PsTag,
    PsTabs,
    PsDialog,
    PsCascader,
    PsDrawer,
    PsImage,
    PsDropdown,
    PsUploadFile,
    PsUploadImage,
    PsTimePicker,
    PsDatePicker,
    PsDatetimePicker,
    PsForm,
    PsFormItem,
    PsTable,
    PsTableColumn,
    PsTooltip,
    psTitle,
    PsInformation,
    PsInformationItem,
    PsBlock,
    PsDetail,
    PsDetailItem,
    PsSearch,
    PsSidebar,
    PsCharts
];

const install = function (Vue) {
    components.forEach((component) => {
        Vue.component(component.name, component);
    });
};

export default {
    install,
};
