import { ComponentID, ElementID } from '../enums';
import useConfig from './useConfig';
import { useGenerateThemeStyles } from './useGenerateThemeStyles';
export const useAmityElement = ({
  pageId,
  componentId,
  elementId
}) => {
  const uiReference = `${pageId}/${componentId}/${elementId}`;
  const {
    excludes,
    getDefaultConfig,
    getUiKitConfig
  } = useConfig();
  const config = getUiKitConfig({
    page: pageId,
    component: componentId,
    element: elementId
  });
  const defaultConfig = getDefaultConfig(uiReference);
  //@ts-ignore
  const themeStyles = useGenerateThemeStyles(config);
  const isExcluded = excludes.includes(uiReference);
  const accessibilityId = uiReference;
  return {
    config,
    defaultConfig,
    uiReference,
    accessibilityId,
    themeStyles,
    isExcluded
  };
};
export const useAmityComponent = ({
  pageId,
  componentId
}) => {
  const elementId = ElementID.WildCardElement;
  return useAmityElement({
    pageId,
    componentId,
    elementId
  });
};
export const useAmityPage = ({
  pageId
}) => {
  const componentId = ComponentID.WildCardComponent;
  const elementId = ElementID.WildCardElement;
  return useAmityElement({
    pageId,
    componentId,
    elementId
  });
};
//# sourceMappingURL=useUiKitReference.js.map