import { __ } from "@wordpress/i18n"; import { PanelBody } from "@wordpress/components"; import { TabControls } from "../../components"; import { HeadingStyle, StyleTab } from "./styleTab"; import { GeneralTab, HeadingTab } from "./generalTab"; // import { useState } from "@wordpress/element"; import { AdvancedTab, VisibilityTab } from "../shared/advancedTab"; import { usePanelBodyContext } from "../../context"; const Inspector = ({ attributes, setAttributes }) => { const { openPanel, togglePanelBody } = usePanelBodyContext(); return ( <> togglePanelBody("general")} > {openPanel === "general" && ( )} {attributes.layout === "layoutTwo" && ( togglePanelBody("heading")} > {openPanel === "heading" && ( )} )} togglePanelBody("advance")} > {openPanel === "advance" && ( )} ); }; export default Inspector;