local z=(script:FindFirstAncestor("\067\109\100\114\065\100\100\105\116\105\111\110\115")).Shared local A=require(z.GroupController)local Y={}Y.__index=Y function Y.new(z)local m=setmetatable({CmdrAdditions=z,Controller=A.new(z.Config)},Y)m.Group=m.Controller:GetDefaultGroup()local function W(z)m.Group=z end z.Network:HandleEvent("\085\112\100\097\116\101\071\114\111\117\112",W);(z.Network:Request("\071\101\116\071\114\111\117\112")):andThen(W)return m end function Y.CanRunCommand(A,z)return A.Controller:CanGroupRunCommand(A.Group,z)end function Y.SetRegistery(A,z)A.Controller:SetRegistry(z)end return Y
local Shared = script:FindFirstAncestor("CmdrAdditions").Shared

local GroupController = require(Shared.GroupController)

local PermissionsClient = {}
PermissionsClient.__index = PermissionsClient

function PermissionsClient.new(cmdrAdditions)
	local self = setmetatable({
		CmdrAdditions = cmdrAdditions,
		Controller = GroupController.new(cmdrAdditions.Config)
	}, PermissionsClient)

	self.Group = self.Controller:GetDefaultGroup()

	local function setGroup(groupName)
		self.Group = groupName
	end
	cmdrAdditions.Network:HandleEvent("UpdateGroup", setGroup)
	cmdrAdditions.Network:Request("GetGroup"):andThen(setGroup)

	return self
end

function PermissionsClient:CanRunCommand(commandId)
	return self.Controller:CanGroupRunCommand(self.Group, commandId)
end

function PermissionsClient:SetRegistery(registry)
	self.Controller:SetRegistry(registry)
end

return PermissionsClient