import "../../../src/scss/form-preview.scss";
import Vue from 'vue';
export default Vue.extend({
  name: 'w-form-preview',
  props: {
    title: String,
    value: String,
    dataItems: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    buttons: {
      type: Array,
      default: function _default() {
        return [];
      }
    }
  },
  render: function render() {
    var h = arguments[0];
    return h("div", {
      "class": "weui-form-preview"
    }, [h("div", {
      "class": "weui-form-preview__hd"
    }, [h("label", {
      "class": "weui-form-preview__label",
      "domProps": {
        "innerHTML": this.title
      }
    }), h("em", {
      "class": "weui-form-preview__value",
      "domProps": {
        "innerHTML": this.value
      }
    })]), h("div", {
      "class": "weui-form-preview__bd"
    }, [this.dataItems.map(function (item, key) {
      return h("div", {
        "class": "weui-form-preview__item",
        "key": key
      }, [h("label", {
        "class": "weui-form-preview__label"
      }, [item.label]), h("span", {
        "class": "weui-form-preview__value"
      }, [item.value])]);
    })]), h("div", {
      "class": "weui-form-preview__ft"
    }, [this.buttons.map(function (button, index) {
      return h("div", {
        "key": index,
        "class": ['weui-form-preview__btn', button.type === 'primary' ? 'weui-form-preview__btn_primary' : 'weui-form-preview__btn_default'],
        "domProps": {
          "textContent": button.text
        },
        "on": {
          "click": function click() {
            button.action();
          }
        }
      });
    })])]);
  }
});
//# sourceMappingURL=WFormPreview.js.map