{"version":3,"file":"index.mjs","sources":["../../../../packages/hooks/use-condition-watch/index.ts"],"sourcesContent":["import { shallowRef, watch, type WatchCallback, type WatchOptions } from 'vue'\n\nexport const useConditionWatch = (source: any, callback: WatchCallback, options?: WatchOptions) => {\n  const condition = shallowRef(false)\n  watch(source, (...args) => {\n    if (!condition.value) return\n    callback(...args)\n  }, options)\n  return condition\n}"],"names":[],"mappings":";;AAEO,MAAM,iBAAoB,GAAA,CAAC,MAAa,EAAA,QAAA,EAAyB,OAA2B,KAAA;AACjG,EAAM,MAAA,SAAA,GAAY,WAAW,KAAK,CAAA,CAAA;AAClC,EAAM,KAAA,CAAA,MAAA,EAAQ,IAAI,IAAS,KAAA;AACzB,IAAA,IAAI,CAAC,SAAU,CAAA,KAAA;AAAO,MAAA,OAAA;AACtB,IAAA,QAAA,CAAS,GAAG,IAAI,CAAA,CAAA;AAAA,KACf,OAAO,CAAA,CAAA;AACV,EAAO,OAAA,SAAA,CAAA;AACT;;;;"}