import ksPopup from '../popup';
import ksButton from '../button';
import Mixins from './mixin.js';
import "./date-picker-dropdown.css";
import './date-picker-dropdown-sfc.css';

var __vue_render__ = function __vue_render__() {
  var _vm = this;

  var _h = _vm.$createElement;

  var _c = _vm._self._c || _h;

  return _c('div', {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.value,
      expression: "value"
    }],
    ref: "datepickerDropdown",
    staticClass: "ks-date-picker-dropdown-warpper",
    style: {
      top: _vm.top + "px"
    }
  }, [_c('ks-popup', {
    staticClass: "ks-date-picker-dropdown-popup",
    attrs: {
      "value": _vm.value,
      "position": "top",
      "overlay-style": {
        position: 'absolute'
      },
      "get-container": _vm.getContainer,
      "duration": "0.2",
      "closeable": false,
      "close-on-click-overlay": false
    },
    on: {
      "input": _vm.handleClosePopup,
      "open": _vm.handleOpenPopup
    }
  }, [_c('div', {
    staticClass: "ks-date-picker ks-date-picker-dropdown"
  }, [_c('div', {
    staticClass: "ks-date-picker__body"
  }, [_c(_vm.currentCom, _vm._b({
    ref: "selector",
    tag: "component",
    on: {
      "select": _vm.handleSelect
    }
  }, 'component', _vm.$attrs, false))], 1), _vm._v(" "), _vm.showConfirm ? _c('div', {
    staticClass: "ks-date-picker-dropdown__footer"
  }, [_c('ks-button', {
    staticClass: "van-calendar__confirm",
    attrs: {
      "type": "primary",
      "disabled": !_vm.currentSelectedValue,
      "block": ""
    },
    on: {
      "click": _vm.handleConfirm
    }
  }, [_vm._v("确定")])], 1) : _vm._e()])])], 1);
};

var __vue_staticRenderFns__ = [];
export default {
  render: __vue_render__,
  staticRenderFns: __vue_staticRenderFns__,
  name: 'date-picker-dropdown',
  mixins: [Mixins],
  components: {
    ksPopup: ksPopup,
    ksButton: ksButton
  },
  props: {
    top: {
      type: Number,
      default: 0
    }
  },
  methods: {
    getContainer: function getContainer() {
      return this.$refs.datepickerDropdown;
    }
  }
};