{"version":3,"file":"viewState.mjs","names":[],"sources":["../../src/enums/viewState.ts"],"sourcesContent":["// main\nimport { makeEnum } from '@transcend-io/type-utils';\n\n/**\n * Consent Manager view state for the Interactive Advertising Bureau\n */\nexport const IABViewState = makeEnum({\n  /** Transparency and Consent Framework for Europe */\n  TCF_EU: 'TCF_EU',\n});\n\n/**\n * View States for Transcend's Consent Manager UI\n */\nexport const InitialTranscendViewState = makeEnum({\n  /** expanded and showing quick select options */\n  QuickOptions: 'QuickOptions',\n  /** three option UI: essential, functional/analytics, advertising */\n  QuickOptions3: 'QuickOptions3',\n  /** accept all button call to action, with more options in the banner footer */\n  AcceptAll: 'AcceptAll',\n  /** toggle button that toggles on or off all active purposes in the current regime */\n  AcceptAllRejectAllToggle: 'AcceptAllRejectAllToggle',\n  /** accept all or more options, both as calls to action */\n  AcceptAllOrMoreChoices: 'AcceptAllOrMoreChoices',\n  /** accept all or reject all */\n  AcceptOrRejectAll: 'AcceptOrRejectAll',\n  /** accept all or reject all or more options */\n  AcceptOrRejectAllOrMoreChoices: 'AcceptOrRejectAllOrMoreChoices',\n  /** accept or reject the Analytics script tag */\n  AcceptOrRejectAnalytics: 'AcceptOrRejectAnalytics',\n  /** accept or reject the Advertising script tag */\n  AcceptOrRejectAdvertising: 'AcceptOrRejectAdvertising',\n  /** data collection notice with do not sell */\n  NoticeAndDoNotSell: 'NoticeAndDoNotSell',\n  /** open a modal that allows for an explanation of do not sell/share, before opting out */\n  DoNotSellExplainer: 'DoNotSellExplainer',\n  /** open a modal that allows for complete options toggling */\n  CompleteOptionsToggles: 'CompleteOptionsToggles',\n  /** open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent */\n  PrivacyPolicyNotice: 'PrivacyPolicyNotice',\n  /**\n   * open a modal that shows a notice that the privacy policy has changed, without any prompt to change consent\n   * and no button to close the modal. instead there is an X in the top right corner of the modal\n   */\n  PrivacyPolicyNoticeWithCloseButton: 'PrivacyPolicyNoticeWithCloseButton',\n  /** expanded and showing full checkbox options */\n  CompleteOptions: 'CompleteOptions',\n  /** complete options, but selecting a checkbox means the user is opted out */\n  CompleteOptionsInverted: 'CompleteOptionsInverted',\n  /** hidden */\n  Hidden: 'Hidden',\n});\n\n/**\n * Type override\n */\nexport type InitialTranscendViewState =\n  (typeof InitialTranscendViewState)[keyof typeof InitialTranscendViewState];\n\n/**\n * Consent Manager view states that can be used at launch\n */\nexport const InitialViewState = makeEnum({\n  /** View States for Transcend's Consent Manager UI */\n  ...InitialTranscendViewState,\n  /** View States for IAB Frameworks */\n  ...IABViewState,\n});\n\n/**\n * Type override\n */\nexport type InitialViewState = (typeof InitialViewState)[keyof typeof InitialViewState];\n\n/**\n * View states that are displayed in response to a user request (e.g. transcend.doNotSell() or )\n */\nexport const ResponseViewState = makeEnum({\n  /** notice that do not sell has been acknowledged properly */\n  DoNotSellDisclosure: 'DoNotSellDisclosure',\n  /** notice of a 1 click opt out for multiple consent purposes */\n  OptOutDisclosure: 'OptOutDisclosure',\n});\n\n/**\n * Type override\n */\nexport type ResponseViewState = (typeof ResponseViewState)[keyof typeof ResponseViewState];\n\n/**\n * Consent Manager view states that can be navigated to after initial view state\n */\nexport const DeepViewState = makeEnum({\n  /** language options */\n  LanguageOptions: 'LanguageOptions',\n});\n\n/**\n * Type override\n */\nexport type DeepViewState = (typeof DeepViewState)[keyof typeof DeepViewState];\n\n/**\n * Consent Manager view states after it's been dismissed\n */\nexport const DismissedViewState = makeEnum({\n  /** showing and collapsed */\n  Collapsed: 'Collapsed',\n  /** closed */\n  Closed: 'Closed',\n});\n\n/**\n * Type override\n */\nexport type DismissedViewState = (typeof DismissedViewState)[keyof typeof DismissedViewState];\n\n/**\n * All possible view states of the Consent Manager\n */\nexport const ViewState = makeEnum({\n  ...InitialViewState,\n  ...ResponseViewState,\n  ...DeepViewState,\n  ...DismissedViewState,\n});\n\n/**\n * Type override\n */\nexport type ViewState = (typeof ViewState)[keyof typeof ViewState];\n"],"mappings":";;;;;AAMA,MAAa,eAAe,SAAS;;AAEnC,QAAQ,UACT,CAAC;;;;AAKF,MAAa,4BAA4B,SAAS;;CAEhD,cAAc;;CAEd,eAAe;;CAEf,WAAW;;CAEX,0BAA0B;;CAE1B,wBAAwB;;CAExB,mBAAmB;;CAEnB,gCAAgC;;CAEhC,yBAAyB;;CAEzB,2BAA2B;;CAE3B,oBAAoB;;CAEpB,oBAAoB;;CAEpB,wBAAwB;;CAExB,qBAAqB;;;;;CAKrB,oCAAoC;;CAEpC,iBAAiB;;CAEjB,yBAAyB;;CAEzB,QAAQ;CACT,CAAC;;;;AAWF,MAAa,mBAAmB,SAAS;;CAEvC,GAAG;;CAEH,GAAG;CACJ,CAAC;;;;AAUF,MAAa,oBAAoB,SAAS;;CAExC,qBAAqB;;CAErB,kBAAkB;CACnB,CAAC;;;;AAUF,MAAa,gBAAgB,SAAS;;AAEpC,iBAAiB,mBAClB,CAAC;;;;AAUF,MAAa,qBAAqB,SAAS;;CAEzC,WAAW;;CAEX,QAAQ;CACT,CAAC;;;;AAUF,MAAa,YAAY,SAAS;CAChC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACJ,CAAC"}