<?php

namespace App\Libraries\Contracts;

/**
 * Shared shape between App\Libraries\Settings (tenant_settings — a hotel's
 * own Hubtel/WhatsApp account) and App\Libraries\PlatformSettings
 * (platform_settings — the platform's own Hubtel account for collecting
 * subscription payments from hotels). Two different databases, two
 * different Hubtel merchant contexts, but the same "get/set, encrypt
 * anything that looks like a secret" behavior — so App\Libraries\
 * HubtelService can be handed either one without caring which.
 */
interface CredentialStoreInterface
{
    public function get(string $key, ?string $default = null): ?string;

    public function set(string $key, ?string $value): void;

    public function isConfigured(string $key): bool;

    /** @return array<string, string> */
    public function getGroupMasked(string $prefix): array;
}
