1 |
- {"version":3,"file":"selectLink.mjs","names":["nextTick","watch","useSelectLink","link","select","isActive","value","isLink","immediate"],"sources":["../../src/composables/selectLink.ts"],"sourcesContent":["// Utilities\nimport { nextTick, watch } from 'vue'\n\n// Types\nimport type { UseLink } from './router'\n\nexport function useSelectLink (link: UseLink, select?: (value: boolean, e?: Event) => void) {\n watch(() => link.isActive?.value, isActive => {\n if (link.isLink.value && isActive && select) {\n nextTick(() => {\n select(true)\n })\n }\n }, {\n immediate: true,\n })\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,KAAK,QAAQ,KAAK;;AAErC;;AAGA,OAAO,SAASC,aAAaA,CAAEC,IAAa,EAAEC,MAA4C,EAAE;EAC1FH,KAAK,CAAC,MAAME,IAAI,CAACE,QAAQ,EAAEC,KAAK,EAAED,QAAQ,IAAI;IAC5C,IAAIF,IAAI,CAACI,MAAM,CAACD,KAAK,IAAID,QAAQ,IAAID,MAAM,EAAE;MAC3CJ,QAAQ,CAAC,MAAM;QACbI,MAAM,CAAC,IAAI,CAAC;MACd,CAAC,CAAC;IACJ;EACF,CAAC,EAAE;IACDI,SAAS,EAAE;EACb,CAAC,CAAC;AACJ"}
|