<?php

namespace App\Data\Pagarme\Order\Parts\Request;

use App\Data\Pagarme\PagarmeData;

final readonly class SplitOptionsData extends PagarmeData
{
    public function __construct(
        public bool $chargeProcessingFee = false,
        public bool $chargeRemainderFee  = false,
        public bool $liable              = false,
    ) {}

    public function toArray(): array
    {
        return $this->filterFilledRecursive([
            'charge_processing_fee' => $this->chargeProcessingFee,
            'charge_remainder_fee'  => $this->chargeRemainderFee,
            'liable'                => $this->liable,
        ]);
    }
}
