import Collapse from './components/Collapse';
import Dropdown from './components/Dropdown';
import TabsNavigation from "./components/tabs/TabsNavigation";
import TabsPanes from "./components/tabs/TabsPanes";
import Tab from "./components/tabs/Tab";
import TabPane from "./components/tabs/TabPane";
import Form from "./components/Form";
import Input from "./components/Input";
import InputGroup from "./components/InputGroup";
import Textarea from "./components/Textarea";
import Select from "./components/Select";
import Checkbox from "./components/Checkbox";
import Radio from "./components/Radio";
import Button from "./components/Button";
import ButtonGroup from "./components/ButtonGroup";
import ButtonToolbar from "./components/ButtonToolbar";
import Label from "./components/Label";
import Link from "./components/Link";
import FileInput from "./components/FileInput";
import Image from "./components/Image";
import Paragraph from "./components/Paragraph";
import Header from "./components/Header";
import Card from "./components/Card";
import Badge from "./components/Badge";
import Alert from "./components/Alert";
import MediaObject from "./components/MediaObject";
import ColumnBreak from "./components/ColumnBreak";
import Column from "./components/Column";
import Row from "./components/Row";
import Container from "./components/Container";
import Text from "./components/Text";
import Default from "./components/Default";


export default (editor, config = {}) => {
  const c = config;
  const domc = editor.DomComponents;

  const traits = {
    id: {
      name: 'id',
      label: c.labels.trait_id,
    },
    for: {
      name: 'for',
      label: c.labels.trait_for,
    },
    name: {
      name: 'name',
      label: c.labels.trait_name,
    },
    placeholder: {
      name: 'placeholder',
      label: c.labels.trait_placeholder,
    },
    value: {
      name: 'value',
      label: c.labels.trait_value,
    },
    required: {
      type: 'checkbox',
      name: 'required',
      label: c.labels.trait_required,
    },
    checked: {
      label: c.labels.trait_checked,
      type: 'checkbox',
      name: 'checked',
      changeProp: 1
    }
  };

  Image(domc);

  Default(domc);

  Text(domc);

  Link(editor);

  // LAYOUT
  Container(domc);
  Row(domc);
  Column(domc, editor);

  ColumnBreak(domc);
  // Media object
  MediaObject(domc);

  // Bootstrap COMPONENTS

  Alert(domc);

  // TabsBlock(bm, c);
  TabsNavigation(domc, config);
  Tab(domc, config);
  TabsPanes(domc, config);
  TabPane(domc, config);

  // Badge
  Badge(domc);

  // Card
  Card(domc, editor);

  // Collapse
  Collapse(editor);

  // Dropdown
  Dropdown(editor);

  // TYPOGRAPHY
  Header(domc);
  Paragraph(domc);

  Form(domc, traits, config);

  Input(domc, traits, config);

  FileInput(domc, traits, config);

  InputGroup(domc, traits, config);

  Textarea(domc, traits, config);

  Select(editor, domc, traits, config);

  Checkbox(domc, traits, config);

  Radio(domc, traits, config);

  Label(domc, traits, config);

  Button(domc);

  ButtonGroup(domc);

  ButtonToolbar(domc);
}
