package service

import (
	"context"
	"kra/internal/biz/system"
)

type PermissionService struct{ uc *system.PermissionUsecase }

func NewPermissionService(uc *system.PermissionUsecase) *PermissionService {
	return &PermissionService{uc: uc}
}

func (s *PermissionService) SelectedButtons(ctx context.Context, authorityID, menuID uint) ([]uint, error) {
	return s.uc.SelectedButtons(ctx, authorityID, menuID)
}

func (s *PermissionService) SetSelectedButtons(ctx context.Context, authorityID, menuID uint, ids []uint) error {
	return s.uc.SetSelectedButtons(ctx, authorityID, menuID, ids)
}

func (s *PermissionService) CanRemoveButton(ctx context.Context, id string) (bool, error) {
	return s.uc.CanRemoveButton(ctx, id)
}
