<?php

declare(strict_types=1);

namespace ApiModel\Domain\Repository;

interface BillRepositoryInterface
{
    /** @return list<array<string, mixed>> */
    public function listByCompany(string $companyId, ?string $branchId = null): array;

    /** @return array<string, mixed>|null */
    public function findById(string $id): ?array;

    /** @return list<array<string, mixed>> */
    public function findLinesByBillId(string $billId): array;

    /** @param array<string, mixed> $bill */
    public function insert(array $bill): void;

    /** @param array<string, mixed> $bill */
    public function update(string $id, array $bill): void;

    /** @param list<array<string, mixed>> $lines */
    public function insertLines(string $billId, array $lines): void;

    public function deleteLines(string $billId): void;

    public function delete(string $id): void;

    public function nextBillNumber(string $companyId): string;

    public function updateStatusAndBalance(string $id, string $status, string $balance): void;

    /** @return list<array<string, mixed>> */
    public function listUnpaidByVendor(string $companyId, string $vendorId): array;
}
