// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================

package service

import (
	"context"
	"kami/internal/model"
	"kami/internal/model/entity"
)

type (
	ISysAuthRule interface {
		GetMenuListSearch(ctx context.Context, req *model.RuleSearchInput) (res []*model.SysAuthRuleInfoOutput, err error)
		// GetIsMenuList 获取isMenu=0|1
		GetIsMenuList(ctx context.Context) ([]*model.SysAuthRuleInfoOutput, error)
		// GetMenuList 获取所有菜单
		GetMenuList(ctx context.Context) (list []*model.SysAuthRuleInfoOutput, err error)
		// GetIsButtonList 获取所有按钮isMenu=2 菜单列表
		GetIsButtonList(ctx context.Context) ([]*model.SysAuthRuleInfoOutput, error)
		// Add 添加菜单
		Add(ctx context.Context, req *model.RuleAddReq) (err error)
		// BindRoleRule 绑定角色权限
		BindRoleRule(ctx context.Context, ruleId interface{}, roleIds []uint) (err error)
		Get(ctx context.Context, id uint) (rule *entity.V1SysAuthRule, err error)
		GetMenuRoles(ctx context.Context, id uint) (roleIds []uint, err error)
		Update(ctx context.Context, req *model.RuleUpdateInput) (err error)
		UpdateRoleRule(ctx context.Context, ruleId uint, roleIds []uint) (err error)
		GetMenuListTree(pid uint, list []*model.SysAuthRuleInfoOutput) []*model.SysAuthRuleTreeOutput
		// DeleteMenuByIds 删除菜单
		DeleteMenuByIds(ctx context.Context, ids []int) (err error)
		FindSonByParentId(list []*model.SysAuthRuleInfoOutput, pid uint) []*model.SysAuthRuleInfoOutput
	}
)

var (
	localSysAuthRule ISysAuthRule
)

func SysAuthRule() ISysAuthRule {
	if localSysAuthRule == nil {
		panic("implement not found for interface ISysAuthRule, forgot register?")
	}
	return localSysAuthRule
}

func RegisterSysAuthRule(i ISysAuthRule) {
	localSysAuthRule = i
}
