import { createContext, useContext, useMemo } from 'react';
const BehaviourContext = /*#__PURE__*/createContext(undefined);
export const BehaviourProvider = ({
  children,
  behaviour
}) => {
  const defaultBehaviour = useMemo(() => ({
    AmitySocialHomePageBehaviour: {},
    AmityGlobalFeedComponentBehavior: {},
    AmityPostContentComponentBehavior: {},
    AmitySocialHomeTopNavigationComponentBehaviour: {},
    AmityCommunitySearchResultComponent: {},
    AmityEmptyNewsFeedComponent: {},
    AmityMyCommunitiesComponentBehaviour: {},
    AmityCreatePostMenuComponentBehavior: {},
    AmityPostTargetSelectionPageBehavior: {},
    AmityStoryTargetSelectionPageBehavior: {},
    AmityLivestreamPostTargetSelectionPageBehavior: {},
    AmityCommunityProfilePageBehavior: {},
    AmityPollTargetSelectionPageBehavior: {},
    AmityCommunitySetupPageBehavior: {},
    AmityCommunitySettingPageBehavior: {},
    AmityCommunityMembershipPageBehavior: {},
    AmityCommunityNotificationSettingPageBehavior: {},
    AmityPostComposerPageBehavior: {},
    AmityUserProfilePageBehavior: {},
    AmityBlockedUsersPageBehavior: {},
    AmityUserRelationshipPageBehavior: {},
    AmityUserProfileHeaderComponentBehavior: {},
    AmityUserPendingFollowRequestsPageBehavior: {},
    AmityUserFeedComponentBehavior: {}
  }), []);
  const customBehaviour = useMemo(() => ({
    ...defaultBehaviour,
    ...behaviour
  }), [behaviour, defaultBehaviour]);
  return /*#__PURE__*/React.createElement(BehaviourContext.Provider, {
    value: customBehaviour
  }, children);
};
export const useBehaviour = () => {
  const context = useContext(BehaviourContext);
  if (!context) {
    throw new Error('useBehaviour must be used within a BehaviourProvider');
  }
  return context;
};
//# sourceMappingURL=BehaviourProvider.js.map