package resolver

// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen

import (
	"context"

	"github.com/cloudoperators/heureka/internal/api/graphql/graph"
	"github.com/cloudoperators/heureka/internal/api/graphql/graph/baseResolver"
	"github.com/cloudoperators/heureka/internal/api/graphql/graph/model"
)

// SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and Greenhouse contributors
// SPDX-License-Identifier: Apache-2.0

func (r *vulnerabilityFilterValueResolver) SupportGroup(ctx context.Context, obj *model.VulnerabilityFilterValue) (*model.FilterItem, error) {
	item, err := baseResolver.SupportGroupCcrnBaseResolver(r.App, ctx, nil)

	if err != nil {
		return nil, err
	}
	item.FilterName = &baseResolver.VulnerabilityFilterSupportGroup
	return item, err
}

func (r *vulnerabilityFilterValueResolver) Service(ctx context.Context, obj *model.VulnerabilityFilterValue) (*model.FilterItem, error) {
	item, err := baseResolver.ServiceCcrnBaseResolver(r.App, ctx, nil)

	if err != nil {
		return nil, err
	}
	item.FilterName = &baseResolver.VulnerabilityFilterService
	return item, err
}

func (r *Resolver) VulnerabilityFilterValue() graph.VulnerabilityFilterValueResolver {
	return &vulnerabilityFilterValueResolver{r}
}

type vulnerabilityFilterValueResolver struct{ *Resolver }
