import { AppPagePathSegment } from "@dashboard/apps/hooks/useAppsPageNavigation"; import { PageTab, PageTabs } from "@saleor/macaw-ui"; import React, { ComponentProps } from "react"; import { useIntl } from "react-intl"; /** * Bind tab value to path segment to avoid unnecessary mapping */ const TabValue: Record = { SALEOR_APPS: "saleor-apps", THIRD_PARTY: "third-party", }; type AllProps = ComponentProps; type AvailableProps = Omit & { value: AppPagePathSegment; showSaleorApps: boolean; onChange(newValue: AppPagePathSegment): void; }; export const AppPageTabs = ({ showSaleorApps, ...props }: AvailableProps) => { const intl = useIntl(); return ( {showSaleorApps && ( )} ); };