"use strict";

var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");

exports.__esModule = true;
exports.default = void 0;

var _componentRender = _interopRequireDefault(require("../_utils/component-render"));

var _Confirm = _interopRequireDefault(require("./Confirm"));

var render = (0, _componentRender.default)(_Confirm.default);
var _default = {
  success(data) {
    var vm = render(data);
    vm.type = 'success';
    var promise = vm.run();

    promise.update = function (data) {
      return vm.update(data);
    };

    promise.vm = vm;
    return promise;
  },

  error(data) {
    var vm = render(data);
    vm.type = 'error';
    var promise = vm.run();

    promise.update = function (data) {
      return vm.update(data);
    };

    promise.vm = vm;
    return promise;
  }

};
exports.default = _default;