<?php

namespace App\Domain\Shared\Helpers;

use App\Domain\Financial\Models\Invoice;
use App\Domain\Financial\Models\Payment;
use App\Domain\POS\Models\POSTransaction;
use Illuminate\Support\Facades\URL;

class PublicLinkHelper
{
    public static function invoiceLink(Invoice $invoice): string
    {
        return URL::signedRoute('public.invoice', ['uuid' => $invoice->uuid], now()->addDays(30));
    }

    public static function receiptLink(Payment $payment): string
    {
        return URL::signedRoute('public.receipt', ['uuid' => $payment->uuid], now()->addDays(30));
    }

    public static function posReceiptLink(POSTransaction $transaction): string
    {
        return URL::signedRoute('public.pos-receipt', ['uuid' => $transaction->uuid], now()->addDays(30));
    }
}
