package sharedconst

import "strings"

const (
	// Opaque transaction IDs for PIN-protected HTTP actions.
	PinActionUserCreate                     = "2a59e8b4-5a72-4be3-b8fc-4f49941181c3"
	PinActionUserUpdate                     = "428fdf48-3f99-46ea-bc47-8fb2e312be08"
	PinActionUserDelete                     = "a546de2f-f1e6-4c2c-ab03-9b4bf39f4d74"
	PinActionRoleCreate                     = "7fb1d693-8692-4e8f-be86-fd0e29e96bc3"
	PinActionRoleUpdate                     = "18ca5bbf-ce9d-4e24-8ace-793de56c1de0"
	PinActionRoleDelete                     = "b87fca76-783d-45e7-9022-b2d9c95f6da7"
	PinActionRolePermissionAssign           = "48e523f8-d86f-4b24-b0e3-e213e4d33db4"
	PinActionRolePermissionRemove           = "f2bf59f8-0783-40fc-94ce-a79e40f84c44"
	PinActionRolePermissionUpdate           = "de8f3c0c-8f84-4c13-a146-5ca833bc66f7"
	PinActionHelicopterCreate               = "11c8f526-2bf5-4507-bf6b-5ea65e4f2b8a"
	PinActionHelicopterReportGenerate       = "f84fc149-c1a8-4b55-8d68-7f1130a91c62"
	PinActionHelicopterUpdate               = "7436fdf4-0f71-4a5d-a21e-a22cbf7f45fa"
	PinActionHelicopterDelete               = "3b3f6c0c-7e9d-4d7e-b2f2-250d325a9008"
	PinActionHelicopterAOGChange            = "9b2a8f32-b7f1-4cc8-9f75-2f7f4e5d8f1c"
	PinActionFlightInspectionCreate         = "6a4f31e2-f6f2-4fd0-8e0f-c56613fb7996"
	PinActionFlightInspectionUpdate         = "fe936c6f-6634-4c8f-88c0-86f46c22f6e2"
	PinActionAfterFlightInspectionRead      = "7a4f1d7a-3f8e-4a8b-9f8c-5e7b3a9d8a31"
	PinActionAfterFlightInspectionCreate    = "1d7f1e5c-0c1f-4d5d-9c59-2d7b7f9d3c2f"
	PinActionAfterFlightInspectionUpdate    = "b4a7e8b2-1fb4-4c9f-9e6b-7f53c0b4f1a8"
	PinActionAfterFlightInspectionDelete    = "d9c0b6f3-5f3b-4f9d-8a5b-1b0c2d7a9e4f"
	PinActionFlightCreate                   = "03482710-17bb-4478-b379-fafd92a6f2f1"
	PinActionFlightUpdate                   = "f5fe23d8-79af-4f53-82f8-ef5436f54d73"
	PinActionFlightDelete                   = "846f2a97-b4c0-4a89-bacf-14393968ce4d"
	PinActionReserveACCreate                = "70fccbfe-1908-44fd-97eb-8ec7cb26f441"
	PinActionReserveACUpdate                = "514ec6f8-57ef-43a2-ad8c-48be77ef7f7e"
	PinActionReserveACDelete                = "01954c5e-e321-4556-aef1-ed9724f64409"
	PinActionFacilityCreate                 = "4a4e2041-258c-4f12-89af-8473f8b666d6"
	PinActionFacilityUpdate                 = "2a7530e9-b365-4229-b2cc-a7059dbb6530"
	PinActionFacilityDelete                 = "6ca1f6ca-b89f-4be2-9e5d-bebcd4f7140f"
	PinActionBaseCreate                     = "195f2e65-8159-42a9-a198-34fa8e47a9b4"
	PinActionBaseUpdate                     = "f57ef758-53e6-4065-b1ed-58afbfd1bb89"
	PinActionBaseDelete                     = "2e6c907f-7e29-4617-9fd5-5298c4cb5f16"
	PinActionMedicineCreate                 = "8477bc66-28b8-4c21-aa15-3e06d8944aef"
	PinActionMedicineUpdate                 = "832ddfcb-ef58-4c00-b863-d5e11fec3e3d"
	PinActionMedicineDelete                 = "c5ec1cb5-f403-48de-868a-576e4d1d84e1"
	PinActionVocationCreate                 = "e07b5460-5e74-4df7-a81a-0be67a62cc58"
	PinActionVocationUpdate                 = "f3629c15-8a20-4c61-ba04-81bdff021ae6"
	PinActionVocationDelete                 = "dbb1f792-f15c-4a19-9e5d-07c42c2a79df"
	PinActionOpcCreate                      = "97285960-79b9-4beb-97c6-68d0a1113a1d"
	PinActionOpcUpdate                      = "f5c3018b-fcec-470e-88ed-99d58f6d1d45"
	PinActionOpcDelete                      = "f8d692cf-8196-4eab-b33d-fa073729f5a6"
	PinActionForcesPresentCreate            = "fb4026a1-5b41-4a39-bd3e-9f659de7422f"
	PinActionForcesPresentUpdate            = "9e3edd96-7a70-406f-bfa0-5990999f8563"
	PinActionForcesPresentDelete            = "8abebbd0-a265-44d2-8c24-a9787fa168bf"
	PinActionNoIcaoCodeCreate               = "6de5d0e9-f157-4f8f-b86f-470f0f2f4f59"
	PinActionNoIcaoCodeUpdate               = "f116da2f-1229-4f12-97ec-ecbff1936fa7"
	PinActionNoIcaoCodeDelete               = "f315f998-6bc2-4bdd-8aab-2a61184bf51d"
	PinActionHospitalCreate                 = PinActionNoIcaoCodeCreate
	PinActionHospitalUpdate                 = PinActionNoIcaoCodeUpdate
	PinActionHospitalDelete                 = PinActionNoIcaoCodeDelete
	PinActionHealthInsuranceCompaniesCreate = "7d6494e4-44f3-4a49-a370-8cf0f430af26"
	PinActionHealthInsuranceCompaniesUpdate = "88f1e75f-bfc0-48d7-bbe2-10f02f92c514"
	PinActionHealthInsuranceCompaniesDelete = "5ce3f937-1f8c-4140-9f50-9f0a0d9b930f"
	PinActionFederalStateCreate             = "17720d29-8afa-4932-93a3-40d44fbf8563"
	PinActionFederalStateUpdate             = "43f5db24-ac9f-44cd-82da-2d596d93c736"
	PinActionFederalStateDelete             = "b37f7fb2-fdf4-4f31-9de3-a62f0b47eb3b"
	PinActionICAOCreate                     = "f7d407cf-0fb7-4b6b-a530-a22f378f0f2d"
	PinActionICAOUpdate                     = "96f05643-b5ca-4d36-9459-f31d55c5c350"
	PinActionICAODelete                     = "89f3de85-4bca-4fce-8c8f-b79156257e95"
	PinActionCountryCreate                  = "056984e1-e316-428e-a9a1-c4ed6fac2c5a"
	PinActionCountryUpdate                  = "436fcde1-50d3-4bfc-9d90-a082c94732a1"
	PinActionCountryDelete                  = "b72ecaf6-fa38-4bd9-a272-5b00307e5e34"
	PinActionLandCreate                     = PinActionCountryCreate
	PinActionLandUpdate                     = PinActionCountryUpdate
	PinActionLandDelete                     = PinActionCountryDelete
	PinActionMasterSettingsCreate           = "24f9e3f1-4de7-4fd4-bdf6-5e6ac7d3a8a5"
	PinActionMasterSettingsUpdate           = "8ff7fa7f-8d27-4e7a-81dc-b2d15a6cce9d"
	PinActionMasterSettingsDelete           = "c0c9cbe8-f281-44e9-8414-47a5fcc8d6d3"
	PinActionCrewCreate                     = "c6911bc0-9677-4a6d-96e5-8debcde079cb"
	PinActionCrewUpdate                     = "f89fc2cb-11f0-46c8-b5db-71f9be889734"
	PinActionCrewDelete                     = "49e6782e-7d38-48bd-b949-8414827483fb"
	PinActionFileManagerFolderCreate        = "0a5f5463-0f9c-4f75-8da4-5aef28e0fc42"
	PinActionFileManagerFolderUpdate        = "b1fb11f7-a8b4-4d80-b3aa-f54a0f4ec9c0"
	PinActionFileManagerFolderDelete        = "6b84e2d6-2b61-44e3-a4df-7ad4568baf5d"
	PinActionFileManagerFolderRestore       = "08f5d1f2-99a6-4e2e-aaf9-24103fb34b5f"
	PinActionFileManagerFolderPurge         = "645c13eb-0ef4-4f3f-a31f-81f7f08a7718"
	PinActionFileManagerFileCreate          = "f8f4e17c-9b2f-4f1a-a86a-c8c4f2a9de41"
	PinActionFileManagerFileUpload          = "8ef739b4-a56a-4fb2-b563-0bc8f1e9d305"
	PinActionFileManagerFileUpdate          = "4f6405aa-b889-4b9a-8872-d662ef53fcb8"
	PinActionFileManagerFileDelete          = "29db3d11-1064-4940-bf97-e9c8d8cab2b1"
	PinActionFileManagerFileRestore         = "198edb44-8443-4b66-ae5f-1587c3130cc0"
	PinActionFileManagerFilePurge           = "4d2ad12d-aafd-460b-818d-e4bd8f4bf947"
	PinActionFileManagerAttachmentCreate    = "55f6de50-49ea-4e03-b16f-cfe1bcb4f0a2"
	PinActionFileManagerAttachmentDelete    = "39ef5f25-a86d-4f06-a5fc-f85ba6df8a45"
	PinActionHemsDutyRosterCreate           = "a9a8d9d7-8804-4f2b-bd17-a990488f0fc1"
	PinActionHemsDutyRosterUpdate           = "c1c9f6d6-205f-4488-b68a-29f810123b7b"
	PinActionHemsDutyRosterDelete           = "3f8c8de7-10eb-4e92-9415-cfca2b50cc72"
	PinActionHemsDutyRosterDeleteCrew       = "b2f1d1f1-a8b5-43ea-8fea-e4f3225e9d31"
	PinActionBaseDutyRosterCreate           = "b1f0743f-4af8-43f9-acf1-f3ad3df842fb"
	PinActionBaseDutyRosterUpdate           = "cb7f6494-7035-4288-a736-c21ca2aaad6e"
	PinActionBaseDutyRosterDelete           = "399be2cb-b7ea-4e4a-a95e-a45a78475c4f"
	PinActionBaseDutyRosterDeleteCrew       = "f7f57b0a-6e4a-4a59-b8cc-5b0c7fdb3f0f"
	PinActionAirRescuerChecklistCreate      = "0da46094-7af2-4897-84f2-d4f6409a23cd"
	PinActionAirRescuerChecklistUpdate      = "2a8df0df-6c30-4338-a7eb-a288f8f43cb8"
	PinActionAirRescuerChecklistDelete      = "74c4dd5f-4040-4b4f-87c6-f7ca6ad2ffde"
	PinActionFlightPrepCheckCreate          = "c2d8014f-86f7-4e59-acaa-7126d8fa1b2f"
	PinActionFlightPrepCheckUpdate          = "acbe9954-e9b2-447f-bf53-f10da99f1ff8"
	PinActionInsurancePatientDataCreate     = "5b8f8f70-c3f5-4c3a-8e3f-fb5bb886f12f"
	PinActionInsurancePatientDataUpdate     = "ea5da1cf-735f-4bcf-8b6d-d50b9f0f2e85"
	PinActionInsurancePatientDataDelete     = "f5e36c38-10cf-4df2-8eb0-e546f57ecce1"
	PinActionPatientDataCreate              = "a8f4dd13-f255-4d22-8fcf-3ddedca95f79"
	PinActionPatientDataUpdate              = "0171a3fe-33ee-450f-9f64-bfe2ce6ecf72"
	PinActionPatientDataDelete              = "a311702f-778a-4737-9fa5-cb67bf0e43cb"
	PinActionOperationCreate                = "cd6d274d-8459-4fd8-b840-f3f9c06a53d2"
	PinActionOperationUpdate                = "5340a403-7eb1-4f57-966a-d5da679048f4"
	PinActionOperationDelete                = "b5d6ec7c-994b-40f5-90f5-f38bf0878e6e"
	PinActionOperationCategoryCreate        = "e1cb42db-f6d1-42e5-8d5f-cf711ab4bff2"
	PinActionOperationCategoryUpdate        = "ed5e8d89-0674-4378-b260-d560f815d8cb"
	PinActionOperationCategoryDelete        = "3f7b7ce4-f358-4898-baea-19b8f15235d1"
	PinActionHemsOperationCreate            = "5fef650e-0477-4200-af6c-3034f2cd96a6"
	PinActionHemsOperationUpdate            = "2c20f88a-5866-4972-a908-c9766156f332"
	PinActionHemsOperationDelete            = "62de5f5f-e737-4f58-8d8f-b3fce2d618d7"
	PinActionAirRescuerChecklistItemCreate  = "654f0050-c4ad-4dd3-aa52-4a93e9737397"
	PinActionAirRescuerChecklistItemUpdate  = "73ce2aaf-b7a5-4c05-af6f-536775df6e5d"
	PinActionAirRescuerChecklistItemDelete  = "9f2053e6-4be8-4d77-b6f5-89ad6d04a2a4"
	PinActionAuditLogRead                   = "c847e7fc-5e44-48f0-a7d9-1e8d15543d74"
	PinActionTOTPResetSetup                 = "0b5409b5-94f3-4aab-9de2-44b0ad5858f1"
	PinActionWebAuthnResetSetup             = "1f7d457e-0a19-4a36-8d9f-2c66fd2369ab"
	PinActionSessionDelete                  = "3d7d1d5f-ec48-4eca-a7ea-37f4f7927d06"
	PinActionContactCreate                  = "6eea32d5-3c73-4a63-a929-ace48542bd5e"
	PinActionContactUpdate                  = "aa2cfd85-f87d-400f-918c-01d90d965516"
	PinActionContactDelete                  = "1d6d5f43-c174-488f-aab5-8f71be570156"
	PinActionContactStatusChange            = "31f8bb88-a95f-43be-8fd8-129e1355d6a5"
	PinActionContactRoleChange              = "28d6b6fa-4de8-4e70-b65d-59bb54ca9387"
	PinActionContactPilotCategoryChange     = "a90d6543-4196-4a94-b2f5-c1db89dc0f79"
	PinActionContactLicenseEdit             = "dc4cc081-68e5-4304-8b39-40ef7d995f48"
	PinActionContactChiefFlagsEdit          = "ebc77226-7d84-4b4f-9f08-27f004770aee"
	PinActionContactResponsibleComplaints   = "4f4c8f3d-73ea-4eec-8d08-c3be6e2ffad6"
	PinActionContactBulkUpdate              = "d9dc5187-c67e-4f58-9dd3-2664cbc9f9fd"
	PinActionContactIrreversible            = "78f90214-8bcf-4274-adfb-6d207c5f5af6"
	PinActionFmReportComplete               = "1a75135b-430a-4592-83e1-6d27814185af"
	PinActionFmReportDelete                 = "9b4e6d8f-0a2c-4c5e-a7f3-1b0d5e7c9a2f"
	PinActionEASAReleaseSign                = "e4a1c2d8-6b3f-4f7a-9c21-8d5e0b7a4f36"
)

func PinActionForPermissionKey(permissionKey string) string {
	switch strings.TrimSpace(strings.ToLower(permissionKey)) {
	case "user.create":
		return PinActionUserCreate
	case "user.update":
		return PinActionUserUpdate
	case "user.delete":
		return PinActionUserDelete
	case "role.create":
		return PinActionRoleCreate
	case "role.update":
		return PinActionRoleUpdate
	case "role.delete":
		return PinActionRoleDelete
	case "role.permission.assign":
		return PinActionRolePermissionAssign
	case "role.permission.remove":
		return PinActionRolePermissionRemove
	case "role.permission.update":
		return PinActionRolePermissionUpdate
	case "audit.read":
		return PinActionAuditLogRead
	case "helicopter.create":
		return PinActionHelicopterCreate
	case "helicopter.update":
		return PinActionHelicopterUpdate
	case "helicopter.delete":
		return PinActionHelicopterDelete
	case "helicopter.report.generate":
		return PinActionHelicopterReportGenerate
	case "flight_inspection.create":
		return PinActionFlightInspectionCreate
	case "flight_inspection.update":
		return PinActionFlightInspectionUpdate
	case "after_flight.read":
		return PinActionAfterFlightInspectionRead
	case "after_flight.create":
		return PinActionAfterFlightInspectionCreate
	case "after_flight.update":
		return PinActionAfterFlightInspectionUpdate
	case "after_flight.delete":
		return PinActionAfterFlightInspectionDelete
	case "flight.create":
		return PinActionFlightCreate
	case "flight.update":
		return PinActionFlightUpdate
	case "flight.complete":
		return PinActionFmReportComplete
	case "easa_release.sign":
		return PinActionEASAReleaseSign
	case "flight.delete":
		return PinActionFlightDelete
	case "reserve_ac.create":
		return PinActionReserveACCreate
	case "reserve_ac.update":
		return PinActionReserveACUpdate
	case "reserve_ac.delete":
		return PinActionReserveACDelete
	case "facility.create":
		return PinActionFacilityCreate
	case "facility.update":
		return PinActionFacilityUpdate
	case "facility.delete":
		return PinActionFacilityDelete
	case "base.create":
		return PinActionBaseCreate
	case "base.update":
		return PinActionBaseUpdate
	case "base.delete":
		return PinActionBaseDelete
	case "hems_base.create":
		return PinActionBaseCreate
	case "hems_base.update":
		return PinActionBaseUpdate
	case "hems_base.delete":
		return PinActionBaseDelete
	case "medicine.create":
		return PinActionMedicineCreate
	case "medicine.update":
		return PinActionMedicineUpdate
	case "medicine.delete":
		return PinActionMedicineDelete
	case "vocation.create":
		return PinActionVocationCreate
	case "vocation.update":
		return PinActionVocationUpdate
	case "vocation.delete":
		return PinActionVocationDelete
	case "opc.create":
		return PinActionOpcCreate
	case "opc.update":
		return PinActionOpcUpdate
	case "opc.delete":
		return PinActionOpcDelete
	case "forces_present.create":
		return PinActionForcesPresentCreate
	case "forces_present.update":
		return PinActionForcesPresentUpdate
	case "forces_present.delete":
		return PinActionForcesPresentDelete
	case "hospital.create", "no_icao_code.create":
		return PinActionNoIcaoCodeCreate
	case "hospital.update", "no_icao_code.update":
		return PinActionNoIcaoCodeUpdate
	case "hospital.delete", "no_icao_code.delete":
		return PinActionNoIcaoCodeDelete
	case "health_insurance_companies.create":
		return PinActionHealthInsuranceCompaniesCreate
	case "health_insurance_companies.update":
		return PinActionHealthInsuranceCompaniesUpdate
	case "health_insurance_companies.delete":
		return PinActionHealthInsuranceCompaniesDelete
	case "federal_state.create":
		return PinActionFederalStateCreate
	case "federal_state.update":
		return PinActionFederalStateUpdate
	case "federal_state.delete":
		return PinActionFederalStateDelete
	case "icao.create":
		return PinActionICAOCreate
	case "icao.update":
		return PinActionICAOUpdate
	case "icao.delete":
		return PinActionICAODelete
	case "land.create", "country.create":
		return PinActionCountryCreate
	case "land.update", "country.update":
		return PinActionCountryUpdate
	case "land.delete", "country.delete":
		return PinActionCountryDelete
	case "master_settings.create":
		return PinActionMasterSettingsCreate
	case "master_settings.update":
		return PinActionMasterSettingsUpdate
	case "master_settings.delete":
		return PinActionMasterSettingsDelete
	case "flight_prep_check.create":
		return PinActionFlightPrepCheckCreate
	case "flight_prep_check.update":
		return PinActionFlightPrepCheckUpdate
	case "insurance_patient_data.create":
		return PinActionInsurancePatientDataCreate
	case "insurance_patient_data.update":
		return PinActionInsurancePatientDataUpdate
	case "insurance_patient_data.delete":
		return PinActionInsurancePatientDataDelete
	case "patient_data.create":
		return PinActionPatientDataCreate
	case "patient_data.update":
		return PinActionPatientDataUpdate
	case "patient_data.delete":
		return PinActionPatientDataDelete
	case "operation.create":
		return PinActionOperationCreate
	case "operation.update":
		return PinActionOperationUpdate
	case "operation.delete":
		return PinActionOperationDelete
	case "operation_category.create":
		return PinActionOperationCategoryCreate
	case "operation_category.update":
		return PinActionOperationCategoryUpdate
	case "operation_category.delete":
		return PinActionOperationCategoryDelete
	case "hems_operation.create":
		return PinActionHemsOperationCreate
	case "hems_operation.update":
		return PinActionHemsOperationUpdate
	case "hems_operation.delete":
		return PinActionHemsOperationDelete
	case "hems_duty_roster.create":
		return PinActionHemsDutyRosterCreate
	case "hems_duty_roster.update":
		return PinActionHemsDutyRosterUpdate
	case "hems_duty_roster.delete":
		return PinActionHemsDutyRosterDelete
	case "air_rescuer_checklist.create":
		return PinActionAirRescuerChecklistCreate
	case "air_rescuer_checklist.update":
		return PinActionAirRescuerChecklistUpdate
	case "air_rescuer_checklist.delete":
		return PinActionAirRescuerChecklistDelete
	case "file_manager.create":
		return PinActionFileManagerFileCreate
	case "file_manager.update":
		return PinActionFileManagerFileUpdate
	case "file_manager.delete":
		return PinActionFileManagerFileDelete
	case "file_manager.folder.create":
		return PinActionFileManagerFolderCreate
	case "file_manager.folder.update":
		return PinActionFileManagerFolderUpdate
	case "file_manager.folder.delete":
		return PinActionFileManagerFolderDelete
	case "file_manager.file.create":
		return PinActionFileManagerFileCreate
	case "file_manager.file.update":
		return PinActionFileManagerFileUpdate
	case "file_manager.file.delete":
		return PinActionFileManagerFileDelete
	}
	return ""
}
