import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { formatPrice, type CalculationDetails } from "@/lib/calculations" import { PRICES, CONSTRAINTS } from "@/lib/constants" interface CalculationDetailsProps { details: CalculationDetails } export function CalculationDetailsView({ details }: CalculationDetailsProps) { return ( Detaljeret Prisberegning Komplet oversigt over alle delpriser og beregninger {/* Input Values */}

Indtastede værdier

Gulvareal: {details.area} m²
Gulvhøjde: {details.height} cm
Postnummer: {details.postalCode}
Afstand (tur-retur): {details.distance} km
{/* Calculated Values */}

Beregnede værdier

Isoleringstykkelse: {details.insulationThickness} cm ({details.height} - {CONSTRAINTS.CONCRETE_THICKNESS} cm beton)
Isoleringsvolumen: {details.insulationVolume.toFixed(2)} m³
Spartelvægt: {details.compoundWeight.toLocaleString("da-DK")} kg ({details.area} m² × {PRICES.COMPOUND_WEIGHT_PER_M2} kg/m²)
{/* Component Prices */}

Komponent priser

Isolering {details.insulationThickness > 0 ? `(${details.insulationVolume.toFixed(2)} m³ × ${formatPrice(PRICES.INSULATION_TOTAL)}/m³)` : "(simpel arbejdsløn)"}: {formatPrice(details.insulation)}
Gulvvarme ({details.area} m² × {formatPrice(PRICES.FLOOR_HEATING_TOTAL)}/m²): {formatPrice(details.floorHeating)}
Syntetisk net ({details.area} m² × {formatPrice(PRICES.SYNTHETIC_NET_TOTAL)}/m²): {formatPrice(details.syntheticNet)}
Flydespartel ({details.area} m² × {formatPrice(PRICES.SELF_LEVELING_COMPOUND)}/m²): {formatPrice(details.selfLevelingCompound)}
Pumpebil-tillæg ({details.compoundWeight.toLocaleString("da-DK")} kg): {formatPrice(details.pumpTruckFee)}
Startgebyr: {formatPrice(details.startFee)}
{/* Subtotal and Fees */}

Subtotal og tillæg

Subtotal: {formatPrice(details.subtotal)}
Afdækning ({(PRICES.COVERING_PERCENTAGE * 100).toFixed(1)}%): {formatPrice(details.coveringFee)}
Affald ({(PRICES.WASTE_PERCENTAGE * 100).toFixed(2)}%): {formatPrice(details.wasteFee)}
Tillæg i alt: {formatPrice(details.totalFees)}
{/* Transport */}

Transport

Kørsel ({details.distance} km × {formatPrice(PRICES.TRANSPORT_PER_KM)}/km): {formatPrice(details.transport)}
{details.bridgeFee > 0 && (
Storebælt-tillæg: {formatPrice(details.bridgeFee)}
)}
{/* Final Total */}

Total

Total ekskl. moms: {formatPrice(details.totalExclVat)}
Moms (25%): {formatPrice(details.vat)}
Total inkl. moms: {formatPrice(details.totalInclVat)}
) }