{"version":3,"file":"index.mjs","sources":["../../../../src/plugins/createBootstrap/index.ts"],"sourcesContent":["import {type Plugin, ref, type Ref} from 'vue'\nimport type {\n  BootstrapVueOptions,\n  BvnComponentProps,\n  BvnComponents,\n} from '../../types/BootstrapVueOptions'\n\nimport '../../styles/styles.scss'\n\nimport {rtlPlugin} from '../rtl'\nimport {registryPlugin} from '../registry'\nimport {orchestratorPlugin} from '../orchestrator'\nimport {defaultsKey} from '../../utils/keys'\n\n// Main app plugin\nexport const createBootstrap = (pluginData: Readonly<BootstrapVueOptions> = {}): Plugin => ({\n  install(app) {\n    if ((pluginData.registries ?? true) === true) {\n      app.use(registryPlugin, pluginData)\n    }\n    if ((pluginData.rtl ?? true) === true || typeof pluginData.rtl === 'object') {\n      app.use(rtlPlugin, pluginData)\n    }\n    if ((pluginData.orchestrator ?? true) === true) {\n      app.use(orchestratorPlugin)\n    }\n    // Provide global defaults for components\n    const val = pluginData?.components ?? {}\n    app.provide(defaultsKey, ref(val) as Ref<Partial<BvnComponentProps>>)\n  },\n})\n\ndeclare module 'vue' {\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  interface GlobalComponents extends BvnComponents {}\n}\n"],"names":[],"mappings":";;;;;AAeO,MAAM,kBAAkB,CAAC,aAA4C,QAAgB;AAAA,EAC1F,QAAQ,KAAK;AACX,SAAK,WAAW,cAAc,UAAU,MAAM;AAC5C,UAAI,IAAI,gBAAgB,UAAU;AAAA,IACpC;AACA,SAAK,WAAW,OAAO,UAAU,QAAQ,OAAO,WAAW,QAAQ,UAAU;AAC3E,UAAI,IAAI,WAAW,UAAU;AAAA,IAC/B;AACA,SAAK,WAAW,gBAAgB,UAAU,MAAM;AAC9C,UAAI,IAAI,kBAAkB;AAAA,IAC5B;AAEA,UAAM,MAAM,YAAY,cAAc,CAAA;AACtC,QAAI,QAAQ,aAAa,IAAI,GAAG,CAAoC;AAAA,EACtE;AACF;"}