import { createAccessControl } from "better-auth/plugins/access";
import { adminAc, defaultStatements, memberAc, ownerAc } from "better-auth/plugins/organization/access";
import { organizationClient } from "better-auth/client/plugins";

//#region src/auth/permissions.ts
const statement = {
	...defaultStatements,
	project: [
		"create",
		"read",
		"update",
		"delete"
	]
};
const ac = createAccessControl(statement);
const memberRole = ac.newRole({
	project: ["read"],
	...memberAc.statements
});
const adminRole = ac.newRole({
	project: [
		"create",
		"read",
		"update",
		"delete"
	],
	...adminAc.statements
});
const ownerRole = ac.newRole({
	project: [
		"create",
		"read",
		"update",
		"delete"
	],
	...ownerAc.statements
});

//#endregion
export { ac, adminRole, memberRole, organizationClient, ownerRole };