<template>
  <div class="ay-c-modal">
    <p class="ay-c-modal__title">
      {{ title }}
    </p>
    <slot />
    <button
      class="ay-c-modal__close i-x"
      type="button"
      @click="$emit('close')"
    >
      <span class="hidden">Cerrar</span>
    </button>
  </div>
</template>

<style scoped>

</style>

<script>
/**
 * @fileoverview  Modal
 * @version       0.1
 * @author        Miguel Ortiz <miguel.ortiz@decameron.com>
 */

/**
 * Constantes para este componente
 */
const COMPONENT_NAME = 'v-modal'

export default {
  inject: ['$validator'],
  name: COMPONENT_NAME,
  props: {
    title: {
      type: String,
      default: null
    }
  },
  data () {
    return {
      show: this.visibility
    }
  }
}
</script>