| 1 | import { createAuthPlugin } from "@better-auth-ui/core"; |
| 2 | import { |
| 3 | organizationPlugin as coreOrganizationPlugin, |
| 4 | type OrganizationLocalization, |
| 5 | type OrganizationPluginOptions, |
| 6 | } from "@better-auth-ui/core/plugins/organization"; |
| 7 | import { Briefcase } |
| 8 | |
| 9 | import { AcceptInvitation } |
| 10 | import { OrganizationsSettings } |
| 11 | |
| 12 | export const organizationPlugin = |
| 13 | coreOrganizationPlugin.id, |
| 14 | (options: OrganizationPluginOptions |
| 15 | const core = |
| 16 | |
| 17 | return { |
| 18 | ...core, |
| 19 | localization: core.localization |
| 20 | views: { |
| 21 | auth: { acceptInvitation: AcceptInvitation |
| 22 | }, |
| 23 | settingsTabs: [ |
| 24 | { |
| 25 | view: "organizations", |
| 26 | label: ( |
| 27 | <> |
| 28 | <Briefcase className=" |
| 29 | {core.localization.organizations |
| 30 | </> |
| 31 | ), |
| 32 | component: OrganizationsSettings, |
| 33 | }, |
| 34 | ], |
| 35 | }; |
| 36 | }, |
| 37 | ); |