"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = WelcomeGuidePage;
var _data = require("@wordpress/data");
var _components = require("@wordpress/components");
var _i18n = require("@wordpress/i18n");
var _preferences = require("@wordpress/preferences");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

function WelcomeGuidePage() {
  const {
    toggle
  } = (0, _data.useDispatch)(_preferences.store);
  const isVisible = (0, _data.useSelect)(select => {
    const isPageActive = !!select(_preferences.store).get('core/edit-site', 'welcomeGuidePage');
    const isEditorActive = !!select(_preferences.store).get('core/edit-site', 'welcomeGuide');
    return isPageActive && !isEditorActive;
  }, []);
  if (!isVisible) {
    return null;
  }
  const heading = (0, _i18n.__)('Editing a page');
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Guide, {
    className: "edit-site-welcome-guide guide-page",
    contentLabel: heading,
    finishButtonText: (0, _i18n.__)('Continue'),
    onFinish: () => toggle('core/edit-site', 'welcomeGuidePage'),
    pages: [{
      image: /*#__PURE__*/(0, _jsxRuntime.jsx)("video", {
        className: "edit-site-welcome-guide__video",
        autoPlay: true,
        loop: true,
        muted: true,
        width: "312",
        height: "240",
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
          src: "https://s.w.org/images/block-editor/editing-your-page.mp4",
          type: "video/mp4"
        })
      }),
      content: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h1", {
          className: "edit-site-welcome-guide__heading",
          children: heading
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
          className: "edit-site-welcome-guide__text",
          children: (0, _i18n.__)('It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.')
        })]
      })
    }]
  });
}
//# sourceMappingURL=page.js.map