import BaseButton from '@elements/BaseButton/index.vue';

export default {
  name: 'BaseModal',
  components: {
    BaseButton,
  },
  props: {
    title: {
      type: String,
    },
    size: {
      type: String,
      default: 'large',
      validator(value) {
        const props = ['small', 'medium', 'large'];
        return props.indexOf(value) !== -1;
      },
    },
    fullHeight: {
      type: Boolean,
      default: false,
    },
    overlay: {
      type: Boolean,
      default: true,
    },
    disabled: {
      type: Boolean,
      default: false,
    },
    slotDefaultOverflowAuto: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      showAside: true,
    };
  },
  created() {
    if (window.innerWidth <= 680) {
      this.onClickAside();
    }
  },
  methods: {
    onClickAside() {
      this.showAside = !this.showAside;
      this.$emit('show-aside', this.showAside);
    },
  },
};
