Donation checkout via Ladill Pay (9% fee), church/giving QR pages, SSO, and platform scan forwarding. Co-authored-by: Cursor <cursoragent@cursor.com>
64 lines
1.9 KiB
PHP
64 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Support\Qr;
|
|
|
|
class QrFrameStyleCatalog
|
|
{
|
|
/** @return array<string, array{label: string, description: string, border_px: int, mode: string, cta?: string, visible?: bool}> */
|
|
public static function all(): array
|
|
{
|
|
return [
|
|
'none' => [
|
|
'label' => 'None',
|
|
'description' => 'Code only',
|
|
'border_px' => 0,
|
|
'mode' => 'none',
|
|
],
|
|
'thin' => [
|
|
'label' => 'Border',
|
|
'description' => 'Simple white sticker edge',
|
|
'border_px' => 8,
|
|
'mode' => 'border',
|
|
],
|
|
'bold' => [
|
|
'label' => 'Wide border',
|
|
'description' => 'Legacy wide border',
|
|
'border_px' => 16,
|
|
'mode' => 'border',
|
|
'visible' => false,
|
|
],
|
|
'scan_me' => [
|
|
'label' => 'Scan me',
|
|
'description' => 'CTA sticker below code',
|
|
'border_px' => 14,
|
|
'mode' => 'label',
|
|
'cta' => 'SCAN ME',
|
|
],
|
|
'tap_to_scan' => [
|
|
'label' => 'Tap to scan',
|
|
'description' => 'Rounded CTA sticker',
|
|
'border_px' => 14,
|
|
'mode' => 'pill',
|
|
'cta' => 'TAP TO SCAN',
|
|
],
|
|
];
|
|
}
|
|
|
|
/** @return array<string, array{label: string, description: string, border_px: int, mode: string, cta?: string, visible?: bool}> */
|
|
public static function visible(): array
|
|
{
|
|
return array_filter(self::all(), fn (array $style): bool => ($style['visible'] ?? true) === true);
|
|
}
|
|
|
|
/** @return list<string> */
|
|
public static function keys(): array
|
|
{
|
|
return array_keys(self::all());
|
|
}
|
|
|
|
public static function isValid(string $style): bool
|
|
{
|
|
return isset(self::all()[$style]);
|
|
}
|
|
}
|