import { defineMessages } from '../composables/i18n'

export const commonMessages = defineMessages({
	acceptButton: {
		id: 'button.accept',
		defaultMessage: 'Accept',
	},
	affiliateLinksButton: {
		id: 'button.affiliate-links',
		defaultMessage: 'Affiliate links',
	},
	analyticsButton: {
		id: 'button.analytics',
		defaultMessage: 'Analytics',
	},
	betaRelease: {
		id: 'badge.beta-release',
		defaultMessage: 'Beta Release',
	},
	beta: {
		id: 'badge.beta',
		defaultMessage: 'Beta',
	},
	allProjectType: {
		id: 'project-type.all',
		defaultMessage: 'All',
	},
	backButton: {
		id: 'button.back',
		defaultMessage: 'Back',
	},
	cancelButton: {
		id: 'button.cancel',
		defaultMessage: 'Cancel',
	},
	clearButton: {
		id: 'button.clear',
		defaultMessage: 'Clear',
	},
	closeButton: {
		id: 'button.close',
		defaultMessage: 'Close',
	},
	changesSavedLabel: {
		id: 'label.changes-saved',
		defaultMessage: 'Changes saved',
	},
	collectionsLabel: {
		id: 'label.collections',
		defaultMessage: 'Collections',
	},
	confirmPasswordLabel: {
		id: 'label.confirm-password',
		defaultMessage: 'Confirm password',
	},
	continueButton: {
		id: 'button.continue',
		defaultMessage: 'Continue',
	},
	copyIdButton: {
		id: 'button.copy-id',
		defaultMessage: 'Copy ID',
	},
	copyPermalinkButton: {
		id: 'button.copy-permalink',
		defaultMessage: 'Copy permanent link',
	},
	createAProjectButton: {
		id: 'button.create-a-project',
		defaultMessage: 'Create a project',
	},
	createdAgoLabel: {
		id: 'label.created-ago',
		defaultMessage: 'Created {ago}',
	},
	dashboardLabel: {
		id: 'label.dashboard',
		defaultMessage: 'Dashboard',
	},
	dateAtTimeTooltip: {
		id: 'tooltip.date-at-time',
		defaultMessage: '{date, date, long} at {time, time, short}',
	},
	declineButton: {
		id: 'button.decline',
		defaultMessage: 'Decline',
	},
	deleteLabel: {
		id: 'label.delete',
		defaultMessage: 'Delete',
	},
	descriptionLabel: {
		id: 'label.description',
		defaultMessage: 'Description',
	},
	detailsLabel: {
		id: 'label.details',
		defaultMessage: 'Details',
	},
	downloadButton: {
		id: 'button.download',
		defaultMessage: 'Download',
	},
	downloadingButton: {
		id: 'button.downloading',
		defaultMessage: 'Downloading',
	},
	editButton: {
		id: 'button.edit',
		defaultMessage: 'Edit',
	},
	emailLabel: {
		id: 'label.email',
		defaultMessage: 'Email',
	},
	emailUsernameLabel: {
		id: 'label.email-username',
		defaultMessage: 'Email or username',
	},
	errorLabel: {
		id: 'label.error',
		defaultMessage: 'Error',
	},
	errorNotificationTitle: {
		id: 'notification.error.title',
		defaultMessage: 'An error occurred',
	},
	filterByLabel: {
		id: 'label.filter-by',
		defaultMessage: 'Filter by',
	},
	followButton: {
		id: 'button.follow',
		defaultMessage: 'Follow',
	},
	followedProjectsLabel: {
		id: 'label.followed-projects',
		defaultMessage: 'Followed projects',
	},
	galleryInputView: {
		id: 'input.view.gallery',
		defaultMessage: 'Gallery view',
	},
	gridInputView: {
		id: 'input.view.grid',
		defaultMessage: 'Grid view',
	},
	listInputView: {
		id: 'input.view.list',
		defaultMessage: 'Rows view',
	},
	loadingLabel: {
		id: 'label.loading',
		defaultMessage: 'Loading...',
	},
	maxButton: {
		id: 'button.max',
		defaultMessage: 'Max',
	},
	moderationLabel: {
		id: 'label.moderation',
		defaultMessage: 'Moderation',
	},
	moreOptionsButton: {
		id: 'button.more-options',
		defaultMessage: 'More options',
	},
	newBadge: {
		id: 'badge.new',
		defaultMessage: 'New',
	},
	nextButton: {
		id: 'button.next',
		defaultMessage: 'Next',
	},
	noLabel: {
		id: 'label.no',
		defaultMessage: 'No',
	},
	notificationsLabel: {
		id: 'label.notifications',
		defaultMessage: 'Notifications',
	},
	openFolderButton: {
		id: 'button.open-folder',
		defaultMessage: 'Open folder',
	},
	orLabel: {
		id: 'label.or',
		defaultMessage: 'or',
	},
	passwordLabel: {
		id: 'label.password',
		defaultMessage: 'Password',
	},
	playButton: {
		id: 'button.play',
		defaultMessage: 'Play',
	},
	playedLabel: {
		id: 'label.played',
		defaultMessage: 'Played {time}',
	},
	privateLabel: {
		id: 'collections.label.private',
		defaultMessage: 'Private',
	},
	publicLabel: {
		id: 'label.public',
		defaultMessage: 'Public',
	},
	refreshButton: {
		id: 'button.refresh',
		defaultMessage: 'Refresh',
	},
	rejectedLabel: {
		id: 'label.rejected',
		defaultMessage: 'Rejected',
	},
	removeButton: {
		id: 'button.remove',
		defaultMessage: 'Remove',
	},
	removeImageButton: {
		id: 'button.remove-image',
		defaultMessage: 'Remove image',
	},
	reportButton: {
		id: 'button.report',
		defaultMessage: 'Report',
	},
	resetButton: {
		id: 'button.reset',
		defaultMessage: 'Reset',
	},
	retryButton: {
		id: 'button.retry',
		defaultMessage: 'Retry',
	},
	saveButton: {
		id: 'button.save',
		defaultMessage: 'Save',
	},
	saveChangesButton: {
		id: 'button.save-changes',
		defaultMessage: 'Save changes',
	},
	savedLabel: {
		id: 'label.saved',
		defaultMessage: 'Saved',
	},
	savingButton: {
		id: 'button.saving',
		defaultMessage: 'Saving',
	},
	scopesLabel: {
		id: 'label.scopes',
		defaultMessage: 'Scopes',
	},
	searchLabel: {
		id: 'label.search',
		defaultMessage: 'Search',
	},
	searchPlaceholder: {
		id: 'input.search.placeholder',
		defaultMessage: 'Search...',
	},
	serverLabel: {
		id: 'label.server',
		defaultMessage: 'Server',
	},
	serversLabel: {
		id: 'label.servers',
		defaultMessage: 'Servers',
	},
	settingsLabel: {
		id: 'label.settings',
		defaultMessage: 'Settings',
	},
	signInButton: {
		id: 'button.sign-in',
		defaultMessage: 'Sign in',
	},
	signOutButton: {
		id: 'button.sign-out',
		defaultMessage: 'Sign out',
	},
	signUpButton: {
		id: 'button.sign-up',
		defaultMessage: 'Sign up',
	},
	singleplayerLabel: {
		id: 'label.singleplayer',
		defaultMessage: 'Singleplayer',
	},
	sortByLabel: {
		id: 'label.sort-by',
		defaultMessage: 'Sort by',
	},
	stopButton: {
		id: 'button.stop',
		defaultMessage: 'Stop',
	},
	successLabel: {
		id: 'label.success',
		defaultMessage: 'Success',
	},
	titleLabel: {
		id: 'label.title',
		defaultMessage: 'Title',
	},
	unfollowButton: {
		id: 'button.unfollow',
		defaultMessage: 'Unfollow',
	},
	unlistedLabel: {
		id: 'label.unlisted',
		defaultMessage: 'Unlisted',
	},
	uploadImageButton: {
		id: 'button.upload-image',
		defaultMessage: 'Upload image',
	},
	usernameLabel: {
		id: 'label.username',
		defaultMessage: 'Username',
	},
	visibilityLabel: {
		id: 'label.visibility',
		defaultMessage: 'Visibility',
	},
	visitYourProfile: {
		id: 'label.visit-your-profile',
		defaultMessage: 'Visit your profile',
	},
	yesLabel: {
		id: 'label.yes',
		defaultMessage: 'Yes',
	},
	updateAvailableLabel: {
		id: 'label.update-available',
		defaultMessage: 'Update available',
	},
	changelogLabel: {
		id: 'label.changelog',
		defaultMessage: 'Changelog',
	},
	updateButton: {
		id: 'button.update',
		defaultMessage: 'Update',
	},
	contentLabel: {
		id: 'label.content',
		defaultMessage: 'Content',
	},
	versionLabel: {
		id: 'label.version',
		defaultMessage: 'Version',
	},
	projectLabel: {
		id: 'label.project',
		defaultMessage: 'Project',
	},
	actionsLabel: {
		id: 'label.actions',
		defaultMessage: 'Actions',
	},
	noItemsLabel: {
		id: 'label.no-items',
		defaultMessage: 'No items',
	},
})

export const formFieldLabels = defineMessages({
	email: {
		id: 'form.label.email',
		defaultMessage: 'Email',
	},
	firstName: {
		id: 'form.label.first-name',
		defaultMessage: 'First name',
	},
	lastName: {
		id: 'form.label.last-name',
		defaultMessage: 'Last name',
	},
	dateOfBirth: {
		id: 'form.label.date-of-birth',
		defaultMessage: 'Date of birth',
	},
	businessName: {
		id: 'form.label.business-name',
		defaultMessage: 'Business name',
	},
	addressLine: {
		id: 'form.label.address-line',
		defaultMessage: 'Address line',
	},
	addressLine2: {
		id: 'form.label.address-line-2',
		defaultMessage: 'Address line 2 (optional)',
	},
	city: {
		id: 'form.label.city',
		defaultMessage: 'City',
	},
	stateProvince: {
		id: 'form.label.state-province',
		defaultMessage: 'State/province',
	},
	postalCode: {
		id: 'form.label.postal-code',
		defaultMessage: 'Postal code/ZIP code',
	},
	country: {
		id: 'form.label.country',
		defaultMessage: 'Country',
	},
	bankName: {
		id: 'form.label.bank-name',
		defaultMessage: 'Bank name',
	},
	amount: {
		id: 'form.label.amount',
		defaultMessage: 'Amount',
	},
})

export const formFieldPlaceholders = defineMessages({
	emailPlaceholder: {
		id: 'form.placeholder.email',
		defaultMessage: 'Enter email address',
	},
	firstNamePlaceholder: {
		id: 'form.placeholder.first-name',
		defaultMessage: 'Enter first name',
	},
	lastNamePlaceholder: {
		id: 'form.placeholder.last-name',
		defaultMessage: 'Enter last name',
	},
	businessNamePlaceholder: {
		id: 'form.placeholder.business-name',
		defaultMessage: 'Enter business name',
	},
	addressPlaceholder: {
		id: 'form.placeholder.address',
		defaultMessage: 'Enter address',
	},
	address2Placeholder: {
		id: 'form.placeholder.address-2',
		defaultMessage: 'Apartment, suite, etc.',
	},
	cityPlaceholder: {
		id: 'form.placeholder.city',
		defaultMessage: 'Enter city',
	},
	statePlaceholder: {
		id: 'form.placeholder.state',
		defaultMessage: 'Enter state/province',
	},
	postalCodePlaceholder: {
		id: 'form.placeholder.postal-code',
		defaultMessage: 'Enter postal code',
	},
	countryPlaceholder: {
		id: 'form.placeholder.country',
		defaultMessage: 'Select country',
	},
	bankNamePlaceholder: {
		id: 'form.placeholder.bank-name',
		defaultMessage: 'Enter bank name',
	},
	bankNamePlaceholderDropdown: {
		id: 'form.placeholder.bank-name-dropdown',
		defaultMessage: 'Select bank name',
	},
	amountPlaceholder: {
		id: 'form.placeholder.amount',
		defaultMessage: 'Enter amount',
	},
})

export const financialMessages = defineMessages({
	available: {
		id: 'label.available',
		defaultMessage: '{amount} available.',
	},
	rewardsProgramTermsAgreement: {
		id: 'label.rewards-program-terms-agreement',
		defaultMessage: 'I agree to the <terms-link>Rewards Program Terms</terms-link>',
	},
})

export const commonProjectTypeCategoryMessages = defineMessages({
	datapack: {
		id: 'project-type.datapack.category',
		defaultMessage: 'Data Packs',
	},
	mod: {
		id: 'project-type.mod.category',
		defaultMessage: 'Mods',
	},
	modpack: {
		id: 'project-type.modpack.category',
		defaultMessage: 'Modpacks',
	},
	plugin: {
		id: 'project-type.plugin.category',
		defaultMessage: 'Plugins',
	},
	resourcepack: {
		id: 'project-type.resourcepack.category',
		defaultMessage: 'Resource Packs',
	},
	shader: {
		id: 'project-type.shader.category',
		defaultMessage: 'Shaders',
	},
	server: {
		id: 'project-type.server.category',
		defaultMessage: 'Servers',
	},
	project: {
		id: 'project-type.project.category',
		defaultMessage: 'Projects',
	},
})

export const commonProjectTypeTitleMessages = defineMessages({
	datapack: {
		id: 'project-type.datapack.capital',
		defaultMessage: '{count, plural, one {Data Pack} other {Data Packs}}',
	},
	mod: {
		id: 'project-type.mod.capital',
		defaultMessage: '{count, plural, one {Mod} other {Mods}}',
	},
	modpack: {
		id: 'project-type.modpack.capital',
		defaultMessage: '{count, plural, one {Modpack} other {Modpacks}}',
	},
	plugin: {
		id: 'project-type.plugin.capital',
		defaultMessage: '{count, plural, one {Plugin} other {Plugins}}',
	},
	resourcepack: {
		id: 'project-type.resourcepack.capital',
		defaultMessage: '{count, plural, one {Resource Pack} other {Resource Packs}}',
	},
	shader: {
		id: 'project-type.shader.capital',
		defaultMessage: '{count, plural, one {Shader} other {Shaders}}',
	},
	server: {
		id: 'project-type.server.capital',
		defaultMessage: '{count, plural, one {Server} other {Servers}}',
	},
	project: {
		id: 'project-type.project.lowercase',
		defaultMessage: '{count, plural, one {Project} other {Projects}}',
	},
})

export const commonProjectTypeSentenceMessages = defineMessages({
	datapack: {
		id: 'project-type.datapack.lowercase',
		defaultMessage: '{count, plural, one {data pack} other {data packs}}',
	},
	mod: {
		id: 'project-type.mod.lowercase',
		defaultMessage: '{count, plural, one {mod} other {mods}}',
	},
	modpack: {
		id: 'project-type.modpack.lowercase',
		defaultMessage: '{count, plural, one {modpack} other {modpacks}}',
	},
	plugin: {
		id: 'project-type.plugin.lowercase',
		defaultMessage: '{count, plural, one {plugin} other {plugins}}',
	},
	resourcepack: {
		id: 'project-type.resourcepack.lowercase',
		defaultMessage: '{count, plural, one {resource pack} other {resource packs}}',
	},
	shader: {
		id: 'project-type.shader.lowercase',
		defaultMessage: '{count, plural, one {shader} other {shaders}}',
	},
	server: {
		id: 'project-type.server.lowercase',
		defaultMessage: '{count, plural, one {server} other {servers}}',
	},
	project: {
		id: 'project-type.project.lowercase',
		defaultMessage: '{count, plural, one {project} other {projects}}',
	},
})

export const commonSettingsMessages = defineMessages({
	account: {
		id: 'settings.account.title',
		defaultMessage: 'Account and security',
	},
	appearance: {
		id: 'settings.appearance.title',
		defaultMessage: 'Appearance',
	},
	applications: {
		id: 'settings.applications.title',
		defaultMessage: 'Your applications',
	},
	authorizedApps: {
		id: 'settings.authorized-apps.title',
		defaultMessage: 'Authorized apps',
	},
	billing: {
		id: 'settings.billing.title',
		defaultMessage: 'Billing and subscriptions',
	},
	language: {
		id: 'settings.language.title',
		defaultMessage: 'Language',
	},
	pats: {
		id: 'settings.pats.title',
		defaultMessage: 'Personal access tokens',
	},
	profile: {
		id: 'settings.profile.title',
		defaultMessage: 'Public profile',
	},
	sessions: {
		id: 'settings.sessions.title',
		defaultMessage: 'Sessions',
	},
})

export const commonProjectSettingsMessages = defineMessages({
	analytics: {
		id: 'project.settings.analytics.title',
		defaultMessage: 'Analytics',
	},
	description: {
		id: 'project.settings.description.title',
		defaultMessage: 'Description',
	},
	environment: {
		id: 'project.settings.environment.title',
		defaultMessage: 'Environment',
	},
	gallery: {
		id: 'project.settings.gallery.title',
		defaultMessage: 'Gallery',
	},
	general: {
		id: 'project.settings.general.title',
		defaultMessage: 'General',
	},
	license: {
		id: 'project.settings.license.title',
		defaultMessage: 'License',
	},
	links: {
		id: 'project.settings.links.title',
		defaultMessage: 'Links',
	},
	members: {
		id: 'project.settings.members.title',
		defaultMessage: 'Members',
	},
	noPermissionDescription: {
		id: 'project.settings.notice.no-permission.description',
		defaultMessage: `You don't have permission to edit this.`,
	},
	noPermissionTitle: {
		id: 'project.settings.notice.no-permission.title',
		defaultMessage: 'No permission',
	},
	tags: {
		id: 'project.settings.tags.title',
		defaultMessage: 'Tags',
	},
	upload: {
		id: 'project.settings.upload.title',
		defaultMessage: 'Upload',
	},
	versions: {
		id: 'project.settings.versions.title',
		defaultMessage: 'Versions',
	},
	view: {
		id: 'project.settings.view.title',
		defaultMessage: 'View',
	},
})

export const languageSelectorMessages = defineMessages({
	platformApp: {
		id: 'settings.language.platform.app',
		defaultMessage: 'app',
	},
	platformSite: {
		id: 'settings.language.platform.site',
		defaultMessage: 'site',
	},
	languagesDescription: {
		id: 'settings.language.description',
		defaultMessage:
			'Choose your preferred language for the {platform}. Translations are contributed by volunteers <crowdin-link>on Crowdin</crowdin-link>.',
	},
	languageWarning: {
		id: 'settings.language.warning',
		defaultMessage:
			'Changing the {platform} language may cause some content to appear in English if a translation is not available. The {platform} is not yet fully translated, so some content may remain in English for certain languages.',
	},
	noResults: {
		id: 'settings.language.languages.search.no-results',
		defaultMessage: 'No languages match your search.',
	},
	searchFieldPlaceholder: {
		id: 'settings.language.languages.search-field.placeholder',
		defaultMessage: 'Search for a language...',
	},
	searchResultsAnnouncement: {
		id: 'settings.language.languages.search-results-announcement',
		defaultMessage:
			'{matches, plural, =0 {No languages match} one {# language matches} other {# languages match}} your search.',
	},
	standardLanguages: {
		id: 'settings.language.categories.default',
		defaultMessage: 'Standard languages',
	},
	searchResults: {
		id: 'settings.language.categories.search-result',
		defaultMessage: 'Search results',
	},
})

export const paymentMethodMessages = defineMessages({
	paymentMethodCardDisplay: {
		id: 'payment-method.card_display',
		defaultMessage: '{card_brand} ending in {last_four}',
	},
	amazon_pay: {
		id: 'payment-method.amazon_pay',
		defaultMessage: 'Amazon Pay',
	},
	amex: {
		id: 'payment-method.amex',
		defaultMessage: 'American Express',
	},
	cashapp: {
		id: 'payment-method.cashapp',
		defaultMessage: 'Cash App',
	},
	diners: {
		id: 'payment-method.diners',
		defaultMessage: 'Diners Club',
	},
	discover: {
		id: 'payment-method.discover',
		defaultMessage: 'Discover',
	},
	eftpos: {
		id: 'payment-method.eftpos',
		defaultMessage: 'EFTPOS',
	},
	jcb: {
		id: 'payment-method.jcb',
		defaultMessage: 'JCB',
	},
	mastercard: {
		id: 'payment-method.mastercard',
		defaultMessage: 'MasterCard',
	},
	paypal: {
		id: 'payment-method.paypal',
		defaultMessage: 'PayPal',
	},
	paypalInternational: {
		id: 'payment-method.paypal_international',
		defaultMessage: 'PayPal International',
	},
	paypalUS: {
		id: 'payment-method.paypal',
		defaultMessage: 'PayPal',
	},
	unionpay: {
		id: 'payment-method.unionpay',
		defaultMessage: 'UnionPay',
	},
	unknown: {
		id: 'payment-method.unknown',
		defaultMessage: 'Unknown payment method',
	},
	visa: {
		id: 'payment-method.visa',
		defaultMessage: 'Visa',
	},
	venmo: {
		id: 'payment-method.venmo',
		defaultMessage: 'Venmo',
	},
	virtualVisa: {
		id: 'payment-method.virtual-visa',
		defaultMessage: 'Virtual Visa',
	},
	virtualVisaPlural: {
		id: 'payment-method.virtual-visa-plural',
		defaultMessage: 'Virtual Visas',
	},
	giftCard: {
		id: 'payment-method.gift-card',
		defaultMessage: 'Gift card',
	},
	giftCardPlural: {
		id: 'payment-method.gift-card-plural',
		defaultMessage: 'Gift cards',
	},
	charity: {
		id: 'payment-method.charity',
		defaultMessage: 'Charity',
	},
	charityPlural: {
		id: 'payment-method.charity-plural',
		defaultMessage: 'Charities',
	},
})
