import * as Types from '#shared/graphql/types.ts';

import gql from 'graphql-tag';
import { KnowledgeBaseAnswerTranslationFragmentDoc } from '../../../knowledge-base/graphql/fragments/knowledgeBaseAnswerTranslation.api';
import * as VueApolloComposable from '@vue/apollo-composable/compat';
import * as VueCompositionApi from 'vue';
export type ReactiveFunction<TParam> = () => TParam;

export const LinkAddDocument = gql`
    mutation linkAdd($input: LinkInput!) {
  linkAdd(input: $input) {
    link {
      type
      item {
        __typename
        ... on Ticket {
          id
          internalId
          title
          state {
            id
            name
          }
          stateColorCode
        }
        ... on KnowledgeBaseAnswerTranslation {
          ...knowledgeBaseAnswerTranslation
        }
      }
    }
    errors {
      message
      field
    }
  }
}
    ${KnowledgeBaseAnswerTranslationFragmentDoc}`;
export function useLinkAddMutation(options: VueApolloComposable.UseMutationOptions<Types.LinkAddMutation, Types.LinkAddMutationVariables> | ReactiveFunction<VueApolloComposable.UseMutationOptions<Types.LinkAddMutation, Types.LinkAddMutationVariables>> = {}) {
  return VueApolloComposable.useMutation<Types.LinkAddMutation, Types.LinkAddMutationVariables>(LinkAddDocument, options);
}
export type LinkAddMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<Types.LinkAddMutation, Types.LinkAddMutationVariables>;