/**
 * External Dependencies
 */
import { __ } from '@wordpress/i18n';

/**
 * Internal Dependencies
 */
import AdSenseIcon from '@assets/img/ad-types/adsense.svg';
import ImageIcon from '@assets/img/ad-types/image.svg';
import PlainIcon from '@assets/img/ad-types/plain.svg';
import ContentIcon from '@assets/img/ad-types/content.svg';
import GamIcon from '@assets/img/ad-types/gam.svg';
import RawDummyIcon from '@assets/img/ad-types/dummy.svg';

// dummy.svg ships without a viewBox, so scaling it via CSS width/height
// leaves its artwork overflowing the icon chip — add the viewBox the other
// ad-type icons already have so it scales like the rest.
const DummyIcon = ( props ) => (
	<RawDummyIcon viewBox="0 0 100 100" { ...props } />
);

export const STEP_DEFS = [
	{
		id: 'welcome',
		label: __( 'Welcome', 'advanced-ads' ),
		hint: __( 'Goal & data sharing', 'advanced-ads' ),
	},
	{
		id: 'modules',
		label: __( 'Modules', 'advanced-ads' ),
		hint: __( 'Enable features', 'advanced-ads' ),
		advancedOnly: true,
	},
	{
		id: 'ad',
		label: __( 'Ads & Placement', 'advanced-ads' ),
		hint: __( 'Ad type, ad, placement', 'advanced-ads' ),
	},
	{
		id: 'visibility',
		label: __( 'Visibility', 'advanced-ads' ),
		hint: __( 'Who sees ads', 'advanced-ads' ),
	},
	{
		id: 'done',
		label: __( 'Done', 'advanced-ads' ),
		hint: __( 'Ad published', 'advanced-ads' ),
	},
];

export const AD_TYPES = [
	{
		id: 'adsense',
		title: __( 'AdSense ad', 'advanced-ads' ),
		desc: __(
			'Display ads from your Google AdSense account.',
			'advanced-ads'
		),
		Icon: AdSenseIcon,
	},
	{
		id: 'image',
		title: __( 'Image ad', 'advanced-ads' ),
		desc: __(
			'A banner image linked to an advertiser or affiliate program.',
			'advanced-ads'
		),
		Icon: ImageIcon,
	},
	{
		id: 'plain',
		title: __( 'Plain text & code', 'advanced-ads' ),
		desc: __(
			'Paste ad code from an ad network, or your own HTML and JavaScript.',
			'advanced-ads'
		),
		Icon: PlainIcon,
	},
	{
		id: 'content',
		title: __( 'Rich content', 'advanced-ads' ),
		desc: __(
			'Compose an ad with text, links and media in the editor.',
			'advanced-ads'
		),
		Icon: ContentIcon,
	},
	{
		id: 'gam',
		title: __( 'Google Ad Manager', 'advanced-ads' ),
		desc: __(
			'Serve an ad unit from your Ad Manager account.',
			'advanced-ads'
		),
		Icon: GamIcon,
	},
	{
		id: 'dummy',
		title: __( 'Dummy ad', 'advanced-ads' ),
		desc: __(
			'A placeholder box for testing placements before real ads.',
			'advanced-ads'
		),
		Icon: DummyIcon,
	},
];

export const PREFS = [
	{
		id: 'recommended',
		title: __( 'Recommended setup', 'advanced-ads' ),
		desc: __(
			'Use sensible defaults and only show settings you need.',
			'advanced-ads'
		),
		badge: __( 'Recommended', 'advanced-ads' ),
	},
	{
		id: 'advanced',
		title: __( 'Advanced setup', 'advanced-ads' ),
		desc: __(
			'Show additional configuration options during setup.',
			'advanced-ads'
		),
	},
];

export const PLACEMENTS = [
	{
		id: 'header',
		title: __( 'Header Code', 'advanced-ads' ),
		desc: __(
			'Injected in Header (before closing </head> Tag, often not visible).',
			'advanced-ads'
		),
	},
	{
		id: 'before',
		title: __( 'Before content', 'advanced-ads' ),
		desc: __( 'Show an ad before the main content.', 'advanced-ads' ),
	},
	{
		id: 'content',
		title: __( 'In-content', 'advanced-ads' ),
		desc: __( 'Insert an ad within your content.', 'advanced-ads' ),
		badge: __( 'Recommended', 'advanced-ads' ),
	},
	{
		id: 'after',
		title: __( 'After content', 'advanced-ads' ),
		desc: __( 'Show an ad after the main content.', 'advanced-ads' ),
	},
	{
		id: 'sidebar',
		title: __( 'Sidebar', 'advanced-ads' ),
		desc: __( 'Show an ad in a sidebar.', 'advanced-ads' ),
	},
	{
		id: 'footer',
		title: __( 'Footer Code', 'advanced-ads' ),
		desc: __(
			'Injected in Footer (before closing </body> Tag).',
			'advanced-ads'
		),
	},
];

export const PLACEMENT_SENTENCES = {
	header: __( 'in the header of every page', 'advanced-ads' ),
	before: __( 'before the content on every post', 'advanced-ads' ),
	content: __( 'after the 3rd paragraph on every post', 'advanced-ads' ),
	after: __( 'after the content on every post', 'advanced-ads' ),
	sidebar: __( 'in your primary sidebar', 'advanced-ads' ),
	footer: __( 'in the footer of every page', 'advanced-ads' ),
};

export const ROLES = [
	{ id: 'administrator', label: __( 'Administrator', 'advanced-ads' ) },
	{ id: 'editor', label: __( 'Editor', 'advanced-ads' ) },
	{ id: 'author', label: __( 'Author', 'advanced-ads' ) },
	{ id: 'contributor', label: __( 'Contributor', 'advanced-ads' ) },
	{ id: 'subscriber', label: __( 'Subscriber', 'advanced-ads' ) },
	{ id: 'customer', label: __( 'Customer', 'advanced-ads' ) },
];

export const DISABLE_OPTIONS = [
	{ id: 'all', label: __( 'Disable all ads in frontend', 'advanced-ads' ) },
	{
		id: '404',
		label: __( 'Disable ads on 404 error pages', 'advanced-ads' ),
	},
	{
		id: 'archives',
		label: __( 'Disable ads on non-singular pages', 'advanced-ads' ),
	},
	{
		id: 'secondary',
		label: __( 'Disable ads on secondary queries', 'advanced-ads' ),
	},
	{ id: 'feed', label: __( 'Disable ads in RSS Feed', 'advanced-ads' ) },
	{ id: 'rest-api', label: __( 'Disable ads in REST API', 'advanced-ads' ) },
];

export const DATA_SHARED_LIST = [
	__( 'Which Advanced Ads features and ad types you use', 'advanced-ads' ),
	__(
		'Plugin version and settings you changed from their defaults',
		'advanced-ads'
	),
	__(
		'Counts only — how many ads, groups and placements exist',
		'advanced-ads'
	),
	__( 'Your WordPress and PHP version', 'advanced-ads' ),
];

export const DATA_NOT_SHARED_LIST = [
	__( 'Your visitors or any personal data about them', 'advanced-ads' ),
	__( 'Your ad revenue, impressions or click figures', 'advanced-ads' ),
	__( 'Your ad code, publisher IDs or account credentials', 'advanced-ads' ),
	__( 'Post content, media or customer data', 'advanced-ads' ),
];

export const DATA_TOGGLES = [
	{
		key: 'anonymize',
		label: __( 'Anonymize my site address', 'advanced-ads' ),
		help: __(
			'Replaces your domain with a random identifier, so reports cannot be traced back to your site.',
			'advanced-ads'
		),
	},
	{
		key: 'inclPlugins',
		label: __( 'Include active plugins and theme', 'advanced-ads' ),
		help: __(
			'Helps us reproduce conflicts with the plugins publishers actually run alongside Advanced Ads.',
			'advanced-ads'
		),
	},
	{
		key: 'inclEnv',
		label: __( 'Include environment details', 'advanced-ads' ),
		help: __(
			'Your WordPress and PHP versions, so we know which versions to keep supporting.',
			'advanced-ads'
		),
	},
];

export const PRO_FEATURES = [
	{
		title: __( 'More placements', 'advanced-ads' ),
		desc: __( 'to embed in high-converting spots', 'advanced-ads' ),
	},
	{
		title: __( 'More conditions', 'advanced-ads' ),
		desc: __( 'for advanced targeting', 'advanced-ads' ),
	},
	{
		title: __( 'Ad Tracking', 'advanced-ads' ),
		desc: __( 'to optimize performance', 'advanced-ads' ),
	},
	{
		title: __( 'Click Fraud Protection', 'advanced-ads' ),
		desc: __( 'to safeguard your accounts', 'advanced-ads' ),
	},
	{
		title: __( 'Lazy Loading', 'advanced-ads' ),
		desc: __( 'to speed up your website', 'advanced-ads' ),
	},
];
