{"version":3,"file":"useIsCooldownActive.mjs","names":[],"sources":["../../../../../src/components/MessageComposer/hooks/useIsCooldownActive.ts"],"sourcesContent":["import { useChannel } from '../../../context';\nimport { useStateStore } from '../../../store';\nimport type { CooldownTimerState } from 'stream-chat';\n\nconst cooldownTimerStateSelector = (state: CooldownTimerState) => ({\n  isCooldownActive: !!state.cooldownRemaining,\n});\n\nexport const useIsCooldownActive = () => {\n  const channel = useChannel();\n  return useStateStore(channel.cooldownTimer.state, cooldownTimerStateSelector)\n    .isCooldownActive;\n};\n"],"mappings":";;;AAIA,IAAM,8BAA8B,WAA+B,EACjE,kBAAkB,CAAC,CAAC,MAAM,kBAC5B;AAEA,IAAa,4BAA4B;CAEvC,OAAO,cADS,WACK,CAAA,CAAQ,cAAc,OAAO,0BAA0B,CAAC,CAC1E;AACL"}