<?php
/**
 * ETYKIETOWNIK — Poland (PL) carrier configuration.
 *
 * Free version: InPost Paczkomaty only.
 *
 * PRODUCTION VERIFIED (30.03.2026) against real label API.
 * service_id is per-account — each admin gets their own from GET /account/services.
 *
 * FULL LABEL TEST (InPost KRA01A):
 *   Create → Order → GET label → 17KB PDF, 1 page — CONFIRMED WORKING
 *
 * @package ParcelSelector
 * @since   3.4.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

return array(
	'country_code' => 'PL',
	'country_name' => 'Polska',
	'enabled'      => true,

	// Carrier verified with label API (30.03.2026).
	// service_id is per-account. Admin gets their own from GET /account/services.
	'carriers' => array(

		'inpost' => array(
			'name'            => 'InPost Paczkomaty',
			'shipping provider'      => true,
			'verified'        => true,
			'type'            => 'parcel_locker',
			'shipping provider_name' => 'inpost',
			'receiver_needs'  => array( 'name', 'phone', 'email', 'point' ),
			'sizes' => array(
				'A' => array( 'width' => 64, 'height' => 8,  'depth' => 38, 'label' => 'A — mala (8x38x64 cm)',  'tested_price' => 15.83 ),
				'B' => array( 'width' => 64, 'height' => 19, 'depth' => 38, 'label' => 'B — srednia (19x38x64 cm)', 'tested_price' => 16.94 ),
				'C' => array( 'width' => 64, 'height' => 41, 'depth' => 38, 'label' => 'C — duza (41x38x64 cm)', 'tested_price' => 19.44 ),
			),
			'max_weight_kg'   => 25,
			'detect_pattern'  => '/^[A-Z]{3}\d{2}[A-Z]?$/i',
			'tracking_url'    => 'https://inpost.pl/sledzenie-przesylek?number=',
		),
	),

	'notes' => array(
		'InPost: pelny test create->order->label PDF potwierdzone.',
		'service_id jest per-konto — admin dostaje swoje z GET /account/services.',
	),
);
