{"version":3,"sources":["/home/runner/work/unplugin-fluent-vue/unplugin-fluent-vue/dist/nuxt.cjs","../src/nuxt.ts"],"names":["vitePlugin"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACHA,gCAAgD;AAahD,IAAO,aAAA,EAAQ,mCAAA;AAAoC,EACjD,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,YAAA;AAAA,IACN,SAAA,EAAW;AAAA,EACb,CAAA;AAAA,EACA,KAAA,CAAM,OAAA,EAAS,IAAA,EAAM;AACnB,IAAA,GAAA,CAAI,CAAC,OAAA,CAAQ,IAAA,GAAO,CAAC,OAAA,CAAQ,QAAA,EAAU;AACrC,MAAA,OAAA,CAAQ,KAAA,CAAM,CAAA,2EAAA,CAA6E,CAAA;AAC3F,MAAA,MAAA;AAAA,IACF;AAEA,IAAA,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,eAAA,CAAgB,oBAAA,IAAwB,CAAC,CAAA;AAC1D,IAAA,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAI,eAAA,CAAgB,mBAAA,kBAAoB,OAAA,CAAQ,aAAA,UAAiB,KAAG,EAAA,EAAI,oCAAA;AAErF,IAAA,GAAA,CAAI,OAAA,CAAQ,GAAA;AACV,MAAA,gCAAA,2CAAcA,OAAgB,CAAQ,GAAG,CAAC,CAAA;AAE5C,IAAA,GAAA,CAAI,OAAA,CAAQ,QAAA,EAAU;AACpB,MAAA,MAAM,gBAAA,EAAkB;AAAA,QACtB,GAAG,OAAA,CAAQ,QAAA;AAAA,QACX,OAAA,EAAS,IAAA,CAAK,OAAA,CAAQ;AAAA,MACxB,CAAA;AACA,MAAA,gCAAA,0CAAc,eAAoC,CAAC,CAAA;AAAA,IACrD;AAAA,EACF;AACF,CAAC,CAAA;ADVD;AACE;AACF,+BAAC","file":"/home/runner/work/unplugin-fluent-vue/unplugin-fluent-vue/dist/nuxt.cjs","sourcesContent":[null,"// Workaround for:\n// src/nuxt.ts(5,1): error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/@nuxt+schema@3.0.0_rollup@2.79.0/node_modules/@nuxt/schema'. This is likely not portable. A type annotation is necessary.\nimport type { } from '@nuxt/schema'\nimport type { ExternalPluginOptionsFolder, ExternalPluginOptionsFunction } from './types'\n\nimport type { SFCPluginOptions } from './vite'\nimport { addVitePlugin, defineNuxtModule } from '@nuxt/kit'\nimport { directiveTransform } from './directive-transform'\nimport { ExternalFluentPlugin, SFCFluentPlugin } from './vite'\n\ninterface NuxtFluentOptions {\n  sfc?: SFCPluginOptions\n  external?: Omit<ExternalPluginOptionsFolder, 'baseDir'> | ExternalPluginOptionsFunction\n  /**\n   * @default 't' v-t directive name for the directive transform\n   */\n  directiveName?: string\n}\n\nexport default defineNuxtModule<NuxtFluentOptions>({\n  meta: {\n    name: 'fluent-vue',\n    configKey: 'fluentVue',\n  },\n  setup(options, nuxt) {\n    if (!options.sfc && !options.external) {\n      console.error(`[fluent-vue/nuxt] You need to enable at least one of the fluent-vue plugins`)\n      return\n    }\n\n    nuxt.options.vue.compilerOptions.directiveTransforms ??= {}\n    nuxt.options.vue.compilerOptions.directiveTransforms[options.directiveName ?? 't'] = directiveTransform\n\n    if (options.sfc)\n      addVitePlugin(SFCFluentPlugin(options.sfc))\n\n    if (options.external) {\n      const externalOptions = {\n        ...options.external,\n        baseDir: nuxt.options.srcDir,\n      }\n      addVitePlugin(ExternalFluentPlugin(externalOptions))\n    }\n  },\n})\n\ndeclare module '@nuxt/schema' {\n  interface NuxtConfig {\n    fluentVue?: NuxtFluentOptions\n  }\n  interface NuxtOptions {\n    fluentVue?: NuxtFluentOptions\n  }\n}\n"]}