import { Fragment, jsx, jsxs } from "react/jsx-runtime";
import { __ } from "@wordpress/i18n";
import { ExternalLink } from "@wordpress/components";
import { privateApis as blockEditorPrivateApis } from "@wordpress/block-editor";
import { useDispatch } from "@wordpress/data";
import { unlock } from "../../lock-unlock";
import { store as editSiteStore } from "../../store";
import ScreenHeader from "./header";
const { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(
  blockEditorPrivateApis
);
function ScreenCSS() {
  const [style] = useGlobalStyle("", void 0, "user", {
    shouldDecodeEncode: false
  });
  const [inheritedStyle, setStyle] = useGlobalStyle("", void 0, "all", {
    shouldDecodeEncode: false
  });
  const { setEditorCanvasContainerView } = unlock(
    useDispatch(editSiteStore)
  );
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx(
      ScreenHeader,
      {
        title: __("Additional CSS"),
        description: /* @__PURE__ */ jsxs(Fragment, { children: [
          __(
            "You can add custom CSS to further customize the appearance and layout of your site."
          ),
          /* @__PURE__ */ jsx("br", {}),
          /* @__PURE__ */ jsx(
            ExternalLink,
            {
              href: __(
                "https://developer.wordpress.org/advanced-administration/wordpress/css/"
              ),
              className: "edit-site-global-styles-screen-css-help-link",
              children: __("Learn more about CSS")
            }
          )
        ] }),
        onBack: () => {
          setEditorCanvasContainerView(void 0);
        }
      }
    ),
    /* @__PURE__ */ jsx("div", { className: "edit-site-global-styles-screen-css", children: /* @__PURE__ */ jsx(
      StylesAdvancedPanel,
      {
        value: style,
        onChange: setStyle,
        inheritedValue: inheritedStyle
      }
    ) })
  ] });
}
var screen_css_default = ScreenCSS;
export {
  screen_css_default as default
};
//# sourceMappingURL=screen-css.js.map
