{"version":3,"file":"selectors.mjs","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,0CAA0C,GAAG,CACjD,KAA6C,EACpC,EAAE,CAAC,KAAK,CAAC,oCAAoC,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,wBAAwB,GAAG,CAC/B,KAA6C,EACzB,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,+BAA+B,GAAG,CACtC,KAA6C,EACzB,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG;IACxD,0CAA0C;IAC1C,wBAAwB;IACxB,+BAA+B;CAChC,CAAC","sourcesContent":["import type { AnalyticsDataRegulationControllerState } from './AnalyticsDataRegulationController';\n\n/**\n * Selects the data recorded flag from the controller state.\n *\n * @param state - The controller state\n * @returns Whether data has been recorded since the last deletion request\n */\nconst selectHasCollectedDataSinceDeletionRequest = (\n  state: AnalyticsDataRegulationControllerState,\n): boolean => state.hasCollectedDataSinceDeletionRequest;\n\n/**\n * Selects the delete regulation ID from the controller state.\n *\n * @param state - The controller state\n * @returns The regulation ID, or undefined if not set\n */\nconst selectDeleteRegulationId = (\n  state: AnalyticsDataRegulationControllerState,\n): string | undefined => state.deleteRegulationId;\n\n/**\n * Selects the delete regulation creation timestamp from the controller state.\n *\n * @param state - The controller state\n * @returns The deletion timestamp (in milliseconds since epoch), or undefined if not set\n */\nconst selectDeleteRegulationTimestamp = (\n  state: AnalyticsDataRegulationControllerState,\n): number | undefined => state.deleteRegulationTimestamp;\n\n/**\n * Selectors for the AnalyticsDataRegulationController state.\n * These can be used with Redux or directly with controller state.\n */\nexport const analyticsDataRegulationControllerSelectors = {\n  selectHasCollectedDataSinceDeletionRequest,\n  selectDeleteRegulationId,\n  selectDeleteRegulationTimestamp,\n};\n"]}