"use client";
import React from "react";
import styles from "./UnpaidIncomeCard.module.css";

export interface UnpaidIncomeCardProps {
    value: number;
}

export default function UnpaidIncomeCard(props: UnpaidIncomeCardProps) {
    const formatCurrency = (val: number) => {
        return new Intl.NumberFormat("es-AR", { style: "currency", currency: "ARS" }).format(val);
    };

    return (
        <div className={styles.card}>
            <div className={styles.header}>
                <h4 className={styles.title}>Por Cobrar Hoy</h4>
            </div>
            
            <div>
                <p className={styles.value}>{formatCurrency(props.value)}</p>
                <p className={styles.subtitle}>Turnos impagos de la fecha</p>
            </div>
        </div>
    );
}
