"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireWildcard(require("react"));

var _UnityGameWrapper = _interopRequireDefault(require("../UnityGameWrapper/UnityGameWrapper"));

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

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

// import { useState } from '@storybook/addons'
var CookingPlan = (0, _react.forwardRef)(function (_ref, ref) {
  var editor = _ref.editor;

  // const [unityContent, setunityContent] = useState()
  var init = function init(content) {// content.on("MoveEnd", () => {
    //     console.log('move ended')
    //     debugger
    //     // movingResolver()
    // })
    // content.on('ResetEditor', () => {
    //     console.log('editor', editor)
    //     editor.current && editor.current.clear()
    // })
    // content.on('LevelComplete', () => {
    //     console.log('level complete')
    //     editor.current && editor.current.clear()
    // })
    // content.on('GameScore', () => {
    //     console.log('GameScore')
    //     editor.current && editor.current.clear()
    // })
    // setunityContent(content)
  };

  return _react["default"].createElement(_UnityGameWrapper["default"], {
    height: '340px',
    onCreateUnityContent: init,
    buildURL: "https://cookingplan-c140c.firebaseapp.com/Build/Build.json",
    loaderURL: "https://cookingplan-c140c.firebaseapp.com/Build/UnityLoader.js"
  });
});
var _default = CookingPlan;
exports["default"] = _default;