import Component from "@glimmer/component"; import { service } from "@ember/service"; import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item"; import NavItem from "discourse/components/nav-item"; import { headerActionComponentForPlugin } from "discourse/lib/admin-plugin-header-actions"; import i18n from "discourse-common/helpers/i18n"; import AdminPageHeader from "./admin-page-header"; import AdminPluginConfigArea from "./admin-plugin-config-area"; export default class AdminPluginConfigPage extends Component { @service currentUser; @service adminPluginNavManager; get mainAreaClasses() { let classes = ["admin-plugin-config-page__main-area"]; if (this.adminPluginNavManager.isSidebarMode) { classes.push("-with-inner-sidebar"); } else { classes.push("-without-inner-sidebar"); } return classes.join(" "); } get actionsOutletName() { return `admin-plugin-config-page-actions-${this.args.plugin.dasherizedName}`; } get headerActionComponent() { return headerActionComponentForPlugin(this.args.plugin.dasherizedName); } linkText(navLink) { if (navLink.label) { return i18n(navLink.label); } else { return navLink.text; } } }