package biz

import "context"

type PermissionRepo interface {
	Buttons(context.Context, uint) ([]*MenuButton, error)
	SetAuthorityButtons(context.Context, uint, map[uint][]uint) error
	AuthorityButtonIDs(context.Context, uint) ([]uint, error)
	SelectedButtons(context.Context, uint, uint) ([]uint, error)
	SetSelectedButtons(context.Context, uint, uint, []uint) error
	CanRemoveButton(context.Context, string) (bool, error)
}

type PermissionUsecase struct{ PermissionRepo }

func NewPermissionUsecase(repo PermissionRepo) *PermissionUsecase {
	return &PermissionUsecase{PermissionRepo: repo}
}
