import { __ } from "@wordpress/i18n";
import { PanelBody } from "@wordpress/components";
import { useState } from "@wordpress/element";
import { TabControls } from "../../components";
import { AdvancedTab, VisibilityTab } from "../shared/advancedTab";
import { SmartBtnGeneralTab, SmartBtnIconTab, SmartBtnLabelTab } from "./sidebarControl";
const Inspector = ({ attributes, setAttributes }) => {
const [togglePanel, setTogglePanel] = useState("general");
const toggleHandler = (toggleVal, tabName) => {
setTogglePanel(toggleVal ? tabName : "");
};
return (
<>
toggleHandler(value, "general")}
>
toggleHandler(value, "buttonLabel")}
>
toggleHandler(value, "icon")}
>
toggleHandler(value, "advanced")}
>
{togglePanel === "advanced" && (
)}
>
);
};
export default Inspector;