<?php
/**
 * Default plan rows for the HP Pricing Table block.
 *
 * Used in two places:
 *   1. `acf/load_value/key=field_hp_pt_plans` — pre-populates the Plans
 *      repeater in the block editor when the block is first inserted.
 *   2. `template.php` — safety fallback if a published block somehow has
 *      no plan rows.
 *
 * Sub-field keys match the ACF field `name`s registered in hp-pricing-table.php.
 * Stripe pay URLs default to `#` placeholders — fill them in via the block sidebar.
 */

if (!function_exists('hp_pricing_default_plans')) {
	function hp_pricing_default_plans() {
		$footer_note = 'Print mail, EDDM & on-demand mktg available in the Contractor Store';

		$features_starter = [
			['icon' => 'mail',     'label' => 'Done-for-you email mktg'],
			['icon' => 'refresh',  'label' => 'Multi-year follow-up programs'],
			['icon' => 'users',    'label' => '3 user logins'],
			['icon' => 'award',    'label' => 'White glove onboarding'],
			['icon' => 'sparkles', 'label' => 'Data cleanup & upload'],
			['icon' => 'bell',     'label' => 'Lead alerts'],
			['icon' => 'store',    'label' => 'Contractor Store access'],
			['icon' => 'phone',    'label' => 'Phone & ticket support'],
		];

		$features_growth = [
			['icon' => 'mail',     'label' => 'Done-for-you email mktg'],
			['icon' => 'refresh',  'label' => 'Multi-year follow-up programs'],
			['icon' => 'users',    'label' => '6 user logins'],
			['icon' => 'award',    'label' => 'White glove onboarding'],
			['icon' => 'sparkles', 'label' => 'Data cleanup & upload'],
			['icon' => 'bell',     'label' => 'Lead alerts'],
			['icon' => 'store',    'label' => 'Contractor Store access'],
			['icon' => 'share',    'label' => 'Co-op mktg ready'],
			['icon' => 'phone',    'label' => 'Phone & ticket support'],
		];

		$features_pro = [
			['icon' => 'mail',     'label' => 'Done-for-you email mktg'],
			['icon' => 'refresh',  'label' => 'Multi-year follow-up programs'],
			['icon' => 'users',    'label' => '10 user logins'],
			['icon' => 'award',    'label' => 'White glove onboarding'],
			['icon' => 'sparkles', 'label' => 'Data cleanup & upload'],
			['icon' => 'bell',     'label' => 'Lead alerts'],
			['icon' => 'store',    'label' => 'Contractor Store access'],
			['icon' => 'share',    'label' => 'Co-op mktg ready'],
			['icon' => 'star',     'label' => 'Priority onboarding'],
			['icon' => 'phone',    'label' => 'Phone & ticket support'],
		];

		$features_enterprise = [
			['icon' => 'check',           'label' => 'Everything in Pro'],
			['icon' => 'users',           'label' => '11+ user logins'],
			['icon' => 'infinity',        'label' => 'Unlimited contacts'],
			['icon' => 'layout-grid',     'label' => 'Custom dashboard integrations'],
			['icon' => 'mail-check',      'label' => 'Automated thank yous'],
			['icon' => 'clipboard-check', 'label' => 'Client satisfaction surveys'],
			['icon' => 'star',            'label' => 'Testimonial capture'],
			['icon' => 'map-pin',         'label' => 'Multi-location ready'],
		];

		return [
			[
				'card_type'          => 'standard',
				'name'               => 'Starter',
				'users_line'         => 'Up to 3 users',
				'contacts_line'      => 'Up to 1,000 contacts',
				'price_monthly'      => '$299',
				'price_annual'       => '$250',
				'billed_as'          => 'Billed as $2,999/yr',
				'features'           => $features_starter,
				'footer_note'        => $footer_note,
				'button_text'        => 'Get Started',
				'button_url_monthly' => '#',
				'button_url_annual'  => '#',
			],
			[
				'card_type'          => 'popular',
				'name'               => 'Growth',
				'users_line'         => 'Up to 6 users',
				'contacts_line'      => 'Up to 2,500 contacts',
				'price_monthly'      => '$449',
				'price_annual'       => '$375',
				'billed_as'          => 'Billed as $4,499/yr',
				'features'           => $features_growth,
				'footer_note'        => $footer_note,
				'button_text'        => 'Get Started',
				'button_url_monthly' => '#',
				'button_url_annual'  => '#',
			],
			[
				'card_type'          => 'standard',
				'name'               => 'Pro',
				'users_line'         => 'Up to 10 users',
				'contacts_line'      => 'Up to 5,000 contacts',
				'price_monthly'      => '$599',
				'price_annual'       => '$500',
				'billed_as'          => 'Billed as $5,999/yr',
				'features'           => $features_pro,
				'footer_note'        => $footer_note,
				'button_text'        => 'Get Started',
				'button_url_monthly' => '#',
				'button_url_annual'  => '#',
			],
			[
				'card_type'              => 'enterprise',
				'name'                   => 'Enterprise',
				'users_line'             => '11+ users',
				'contacts_line'          => 'Unlimited contacts',
				'enterprise_price_label' => 'Custom',
				'features'               => $features_enterprise,
				'cta_text'               => 'Call us — 248-669-6900',
				'cta_url'                => 'tel:+12486696900',
			],
		];
	}
}
