"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _default;

function _react() {
  const data = _interopRequireDefault(require("react"));

  _react = function _react() {
    return data;
  };

  return data;
}

function _path() {
  const data = require("path");

  _path = function _path() {
    return data;
  };

  return data;
}

function _fs() {
  const data = require("fs");

  _fs = function _fs() {
    return data;
  };

  return data;
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _default({
  success,
  payload,
  api
}) {
  const _ref = payload,
        blockPath = _ref.path; // 拼接真实的路径，应该是项目的 pages 目录下

  const absPath = api.winPath((0, _path().join)(api.paths.absPagesPath, blockPath));
  success({
    exists: (0, _fs().existsSync)(absPath),
    success: true
  });
}