import type { UserGroupItemResponseModel, UserGroupResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
import { UMB_CONTENT_SECTION_ALIAS } from '@umbraco-cms/backoffice/content';
import {
	UMB_USER_PERMISSION_DOCUMENT_CREATE,
	UMB_USER_PERMISSION_DOCUMENT_CREATE_BLUEPRINT,
	UMB_USER_PERMISSION_DOCUMENT_CULTURE_AND_HOSTNAMES,
	UMB_USER_PERMISSION_DOCUMENT_DELETE,
	UMB_USER_PERMISSION_DOCUMENT_DUPLICATE,
	UMB_USER_PERMISSION_DOCUMENT_MOVE,
	UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS,
	UMB_USER_PERMISSION_DOCUMENT_PERMISSIONS,
	UMB_USER_PERMISSION_DOCUMENT_PROPERTY_VALUE_READ,
	UMB_USER_PERMISSION_DOCUMENT_PROPERTY_VALUE_WRITE,
	UMB_USER_PERMISSION_DOCUMENT_PUBLIC_ACCESS,
	UMB_USER_PERMISSION_DOCUMENT_PUBLISH,
	UMB_USER_PERMISSION_DOCUMENT_READ,
	UMB_USER_PERMISSION_DOCUMENT_ROLLBACK,
	UMB_USER_PERMISSION_DOCUMENT_SORT,
	UMB_USER_PERMISSION_DOCUMENT_UNPUBLISH,
	UMB_USER_PERMISSION_DOCUMENT_UPDATE,
} from '@umbraco-cms/backoffice/document';

export type UmbMockUserGroupModel = UserGroupResponseModel & UserGroupItemResponseModel;

export const data: Array<UmbMockUserGroupModel> = [
	{
		id: 'user-group-administrators-id',
		name: 'Administrators',
		alias: 'admin',
		icon: 'icon-medal',
		fallbackPermissions: [
			UMB_USER_PERMISSION_DOCUMENT_READ,
			UMB_USER_PERMISSION_DOCUMENT_CREATE,
			UMB_USER_PERMISSION_DOCUMENT_UPDATE,
			UMB_USER_PERMISSION_DOCUMENT_DELETE,
			UMB_USER_PERMISSION_DOCUMENT_CREATE_BLUEPRINT,
			UMB_USER_PERMISSION_DOCUMENT_NOTIFICATIONS,
			UMB_USER_PERMISSION_DOCUMENT_PUBLISH,
			UMB_USER_PERMISSION_DOCUMENT_PERMISSIONS,
			UMB_USER_PERMISSION_DOCUMENT_UNPUBLISH,
			UMB_USER_PERMISSION_DOCUMENT_DUPLICATE,
			UMB_USER_PERMISSION_DOCUMENT_MOVE,
			UMB_USER_PERMISSION_DOCUMENT_SORT,
			UMB_USER_PERMISSION_DOCUMENT_CULTURE_AND_HOSTNAMES,
			UMB_USER_PERMISSION_DOCUMENT_PUBLIC_ACCESS,
			UMB_USER_PERMISSION_DOCUMENT_ROLLBACK,
			UMB_USER_PERMISSION_DOCUMENT_PROPERTY_VALUE_READ,
			UMB_USER_PERMISSION_DOCUMENT_PROPERTY_VALUE_WRITE,
		],
		permissions: [
			{
				$type: 'DocumentPermissionPresentationModel',
				document: {
					id: 'permissions-document-id',
				},
				verbs: ['Umb.Document.Read'],
			},
			{
				$type: 'DocumentPermissionPresentationModel',
				document: {
					id: 'permissions-2-document-id',
				},
				verbs: ['Umb.Document.Create', 'Umb.Document.Read'],
			},
			{
				$type: 'DocumentPermissionPresentationModel',
				document: {
					id: 'permissions-2-2-document-id',
				},
				verbs: ['Umb.Document.Delete', 'Umb.Document.Read'],
			},
		],
		sections: [
			UMB_CONTENT_SECTION_ALIAS,
			'Umb.Section.Media',
			'Umb.Section.Settings',
			'Umb.Section.Members',
			'Umb.Section.Packages',
			'Umb.Section.Translation',
			'Umb.Section.Users',
		],
		languages: [],
		hasAccessToAllLanguages: true,
		documentRootAccess: true,
		mediaRootAccess: true,
		aliasCanBeChanged: false,
		isDeletable: false,
		flags: [],
	},
	{
		id: 'user-group-editors-id',
		name: 'Editors',
		alias: 'editors',
		icon: 'icon-tools',
		documentStartNode: { id: 'all-property-editors-document-id' },
		fallbackPermissions: [
			'Umb.Document.Read',
			'Umb.Document.Create',
			'Umb.Document.Update',
			'Umb.Document.Delete',
			'Umb.Document.CreateBlueprint',
			'Umb.Document.Notifications',
			'Umb.Document.Publish',
			'Umb.Document.Unpublish',
			'Umb.Document.Duplicate',
			'Umb.Document.Move',
			'Umb.Document.Sort',
			'Umb.Document.PublicAccess',
			'Umb.Document.Rollback',
		],
		permissions: [],
		sections: [UMB_CONTENT_SECTION_ALIAS, 'Umb.Section.Media'],
		languages: [],
		hasAccessToAllLanguages: true,
		documentRootAccess: true,
		mediaRootAccess: true,
		aliasCanBeChanged: true,
		isDeletable: true,
		flags: [],
	},
	{
		id: 'user-group-sensitive-data-id',
		name: 'Sensitive data',
		alias: 'sensitive-data',
		icon: 'icon-lock',
		documentStartNode: { id: 'all-property-editors-document-id' },
		fallbackPermissions: [],
		permissions: [],
		sections: [],
		languages: [],
		hasAccessToAllLanguages: true,
		documentRootAccess: true,
		mediaRootAccess: true,
		aliasCanBeChanged: false,
		isDeletable: false,
		flags: [],
	},
	{
		id: 'user-group-translators-id',
		name: 'Translators',
		alias: 'translators',
		icon: 'icon-globe',
		documentStartNode: { id: 'all-property-editors-document-id' },
		fallbackPermissions: ['Umb.Document.Read', 'Umb.Document.Update'],
		permissions: [],
		sections: ['Umb.Section.Translation'],
		languages: [],
		hasAccessToAllLanguages: true,
		documentRootAccess: true,
		mediaRootAccess: true,
		aliasCanBeChanged: true,
		isDeletable: true,
		flags: [],
	},
	{
		id: 'user-group-writers-id',
		name: 'Writers',
		alias: 'writers',
		icon: 'icon-edit',
		documentStartNode: { id: 'all-property-editors-document-id' },
		fallbackPermissions: [
			'Umb.Document.Read',
			'Umb.Document.Create',
			'Umb.Document.Update',
			'Umb.Document.Notifications',
		],
		permissions: [],
		sections: [UMB_CONTENT_SECTION_ALIAS],
		languages: [],
		hasAccessToAllLanguages: true,
		documentRootAccess: true,
		mediaRootAccess: true,
		aliasCanBeChanged: true,
		isDeletable: true,
		flags: [],
	},
	{
		id: 'forbidden',
		name: 'Forbidden',
		alias: 'forbidden',
		icon: 'icon-lock',
		documentStartNode: { id: 'forbidden-document-id' },
		fallbackPermissions: [],
		permissions: [],
		sections: [],
		languages: [],
		hasAccessToAllLanguages: true,
		documentRootAccess: true,
		mediaRootAccess: true,
		aliasCanBeChanged: false,
		isDeletable: false,
		flags: [],
	},
];
