import AppLayout from './components/Layout/index';
import ListLayout from './components/ListLayout/index';
import SidebarNav from './components/Sidebar/index';
import MdPagination from './components/Pagination/index';
import SearchItem from './components/SearchItem/index';
import DatePicker from './components/DatePicker/index';
import DateRangePicker from './components/DateRangePicker/index';
import TagsViews from './components/TagsViews/index';
import Table from './components/Table/index';
import TableColumn from './components/TableColumn/index';
import MessageBox from './components/MessageBox/index';
import Dialog from './components/Dialog/index';
import { Select, Option } from 'element-ui';
import FormArea from './components/FormArea/index';
import FormLine from './components/FormLine/index';
import FormItem from './components/FormItem/index';
import Transfer from './components/Transfer/index';
import Message from './components/Message/index';

const install = Vue => {
  // Layout
  Vue.component(AppLayout.name, AppLayout);
  Vue.component(ListLayout.name, ListLayout);
  Vue.component(SearchItem.name, SearchItem);
  // 基础组件
  Vue.component(SidebarNav.name, SidebarNav);
  Vue.component(MdPagination.name, MdPagination);
  Vue.component(TagsViews.name, TagsViews);
  Vue.component(Table.name, Table);
  Vue.component(TableColumn.name, TableColumn);
  Vue.prototype.$mdAlert = MessageBox;
  Vue.component(Dialog.name, Dialog);
  Vue.component(FormArea.name, FormArea);
  Vue.component(FormLine.name, FormLine);
  Vue.component(FormItem.name, FormItem);
  Vue.component(Transfer.name, Transfer);
  Vue.prototype.$message = Message;

  // Element-ui
  Vue.component(Select.name, Select);
  Vue.component(Option.name, Option);
  // input
  Vue.component(DatePicker.name, DatePicker);
  Vue.component(DateRangePicker.name, DateRangePicker);
};

// module.exports = rymUi;
// module.exports.default = module.exports = rymUi;
export default {
  install,
};
