<template>
  <div :class="[wrapperClass]" :style="{height: getHeight}">
    <slot></slot>
  </div>
</template>

<script>
import { LIB_NAME } from '../../../../src/util'
const wrapperClass = `${LIB_NAME}-layout-footer`

export default {
  name: 'xLayoutFooter',
  inject: ['xLayout'],
  props: {
    height: {
      type: [Number, String],
      default: 50
    }
  },
  data() {
    return {
      wrapperClass
    }
  },
  computed: {
    getHeight() {
      const height = this.height
      return height > 0 ? height + 'px' : height
    }
  },
  created() {
    this.xLayout.footer = this
  }
}
</script>
