@php /** * The output controls for anything a user designs to put on paper. * * ONE component, used identically by every printable surface: table QR cards, payment QR cards, * the printable menu and the receipt designer. Same position, same order, same labels everywhere. * * It exists because four screens had each grown their own answer to "how do I get this printed" — * two buttons on one, none on another, an Export dropdown on a third, and a print hidden inside it * labelled as a file format. Every one was reasonable alone and the set was incoherent. A surface * that cannot support an option omits it; it never reorders, renames or relocates the rest. * * @var string $target CSS selector of the element to print or rasterise * @var string $name file stem for exports (no extension) * @var bool $nup offer "multiple per sheet" — false where the medium has no sheet (receipt roll) * @var bool $test offer "Test print" — true only where output targets fixed hardware * @var bool $compact icon-only toggle for narrow action rows (card grids); the label moves to title * @var string $page optional @page rule this surface needs while printing * @var string $pageNup optional @page rule for the multiple-per-sheet run */ $target = $target ?? ''; $name = $name ?? 'document'; $nup = $nup ?? true; $test = $test ?? false; $compact = $compact ?? false; $page = $page ?? ''; $pageNup = $pageNup ?? '@page { size: A4 portrait; margin: 10mm; }'; if ($target === '') { return; } @endphp