{"version":3,"file":"composables.mjs","names":["inject","provide","ref","DatePickerSymbol","Symbol","for","createDatePicker","props","hoverDate","hoverMonth","isDragging","dragHandle","hasScrolled","useDatePicker","datePicker","Error"],"sources":["../../../src/labs/VDatePicker/composables.ts"],"sourcesContent":["// Utilities\nimport { inject, provide, ref } from 'vue'\n\n// Types\nimport type { InjectionKey, Ref } from 'vue'\n\nexport type DatePickerProvide = {\n  hoverDate: Ref<any>\n  hoverMonth: Ref<any>\n  isDragging: Ref<boolean>\n  dragHandle: Ref<number | null>\n  hasScrolled: Ref<boolean>\n}\n\nexport const DatePickerSymbol: InjectionKey<DatePickerProvide> = Symbol.for('vuetify:date-picker')\n\ninterface DateProps {\n}\n\nexport function createDatePicker (props: DateProps) {\n  const hoverDate = ref()\n  const hoverMonth = ref()\n  const isDragging = ref(false)\n  const dragHandle = ref(null)\n  const hasScrolled = ref(false)\n\n  provide(DatePickerSymbol, {\n    hoverDate,\n    hoverMonth,\n    isDragging,\n    dragHandle,\n    hasScrolled,\n  })\n\n  return {\n    hoverDate,\n    hoverMonth,\n    isDragging,\n    dragHandle,\n    hasScrolled,\n  }\n}\n\nexport function useDatePicker () {\n  const datePicker = inject(DatePickerSymbol)\n\n  if (!datePicker) throw new Error('foo')\n\n  return datePicker\n}\n"],"mappings":"AAAA;AACA,SAASA,MAAM,EAAEC,OAAO,EAAEC,GAAG,QAAQ,KAAK;;AAE1C;;AAWA,OAAO,MAAMC,gBAAiD,GAAGC,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAC;AAKlG,OAAO,SAASC,gBAAgBA,CAAEC,KAAgB,EAAE;EAClD,MAAMC,SAAS,GAAGN,GAAG,EAAE;EACvB,MAAMO,UAAU,GAAGP,GAAG,EAAE;EACxB,MAAMQ,UAAU,GAAGR,GAAG,CAAC,KAAK,CAAC;EAC7B,MAAMS,UAAU,GAAGT,GAAG,CAAC,IAAI,CAAC;EAC5B,MAAMU,WAAW,GAAGV,GAAG,CAAC,KAAK,CAAC;EAE9BD,OAAO,CAACE,gBAAgB,EAAE;IACxBK,SAAS;IACTC,UAAU;IACVC,UAAU;IACVC,UAAU;IACVC;EACF,CAAC,CAAC;EAEF,OAAO;IACLJ,SAAS;IACTC,UAAU;IACVC,UAAU;IACVC,UAAU;IACVC;EACF,CAAC;AACH;AAEA,OAAO,SAASC,aAAaA,CAAA,EAAI;EAC/B,MAAMC,UAAU,GAAGd,MAAM,CAACG,gBAAgB,CAAC;EAE3C,IAAI,CAACW,UAAU,EAAE,MAAM,IAAIC,KAAK,CAAC,KAAK,CAAC;EAEvC,OAAOD,UAAU;AACnB"}