{"version":3,"file":"transition.mjs","names":["h","mergeProps","Transition","propsFactory","makeTransitionProps","transition","type","Boolean","String","Object","default","validator","val","MaybeTransition","props","slots","rest","component","customProps","name"],"sources":["../../src/composables/transition.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, Transition } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Component, FunctionalComponent, PropType, TransitionProps } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n  transition: {\n    type: [Boolean, String, Object] as PropType<string | boolean | TransitionProps & { component?: Component }>,\n    default: 'fade-transition',\n    validator: val => val !== true,\n  },\n}, 'transition')\n\ninterface MaybeTransitionProps extends TransitionProps {\n  transition?: string | boolean | TransitionProps & { component?: any }\n}\n\nexport const MaybeTransition: FunctionalComponent<MaybeTransitionProps> = (props, { slots }) => {\n  const { transition, ...rest } = props\n\n  const { component = Transition, ...customProps } = typeof transition === 'object' ? transition : {}\n\n  return h(\n    component,\n    mergeProps(typeof transition === 'string' ? { name: transition } : customProps as any, rest as any),\n    slots\n  )\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACtCC,YAAY,6BAErB;AAGA,OAAO,MAAMC,mBAAmB,GAAGD,YAAY,CAAC;EAC9CE,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,OAAO,EAAEC,MAAM,EAAEC,MAAM,CAA6E;IAC3GC,OAAO,EAAE,iBAAiB;IAC1BC,SAAS,EAAEC,GAAG,IAAIA,GAAG,KAAK;EAC5B;AACF,CAAC,EAAE,YAAY,CAAC;AAMhB,OAAO,MAAMC,eAA0D,GAAG,CAACC,KAAK,WAAgB;EAAA,IAAd;IAAEC;EAAM,CAAC;EACzF,MAAM;IAAEV,UAAU;IAAE,GAAGW;EAAK,CAAC,GAAGF,KAAK;EAErC,MAAM;IAAEG,SAAS,GAAGf,UAAU;IAAE,GAAGgB;EAAY,CAAC,GAAG,OAAOb,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAG,CAAC,CAAC;EAEnG,OAAOL,CAAC,CACNiB,SAAS,EACThB,UAAU,CAAC,OAAOI,UAAU,KAAK,QAAQ,GAAG;IAAEc,IAAI,EAAEd;EAAW,CAAC,GAAGa,WAAkB,EAAEF,IAAI,CAAQ,EACnGD,KAAK,CACN;AACH,CAAC"}