link.ts 608 B

123456789101112131415161718192021222324
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { createSection } from '@formkit/inputs'
  3. import { markRaw } from 'vue'
  4. import FormFieldLink from '#shared/components/Form/FormFieldLink.vue'
  5. import type { FormKitSchemaNode } from '@formkit/core'
  6. export const link = createSection(
  7. 'link',
  8. () =>
  9. ({
  10. $cmp: markRaw(FormFieldLink),
  11. if: '$link',
  12. props: {
  13. id: '$id',
  14. link: '$link',
  15. linkIcon: '$linkIcon',
  16. linkLabel: '$linkLabel',
  17. onLinkClick: '$onLinkClick',
  18. },
  19. }) as unknown as FormKitSchemaNode,
  20. )