import React from 'react';
import { useDesignStore } from '../../store/useDesignStore';
import { calculateBearing } from '../../engine/bearing';
import { calculateAnchorage } from '../../engine/anchorage';
export const DetailedReport: React.FC = () => {
const { geometry, materials, loads, anchorage } = useDesignStore();
const bearing = calculateBearing(geometry, materials, loads);
const anchor = calculateAnchorage(anchorage, materials, loads);
return (
{/* Left Column */}
GEOMETRY
Column Section
{geometry.columnDetails.designation}
{geometry.plateShape === 'rectangular' ? 'Plate Width' : 'Plate Diameter'}
{geometry.plateShape === 'rectangular' ? geometry.widthZ : geometry.diameter} in
Support Width
{geometry.support.widthWp1} in
FACTORED LOADS (LRFD)
Vertical Load P
{loads.P} kip
Moment Mx
{loads.Mx} k-ft
Shear Vx
{loads.Vx} kip
BEARING STRESSES
Concrete Strength f'c
{materials.fc} ksi
Bearing Strength phiPpn
{bearing.phiPn.toFixed(1)} kip
Design Ratio
{bearing.bearingRatio.toFixed(2)} {bearing.isSafe ? '✓' : 'X'}
{bearing.isSafe &&
BEARING STRESSES ARE OK
}
{/* Right Column */}
BASE PLATE DESIGN
Steel Strength Fy
{materials.fy_plate} ksi
Thickness Required
0.00 in {/* Placeholder for actual bending calc */}
Use Plate Thickness
{geometry.thickness.toFixed(2)} in ✓
ANCHORAGE DESIGN
Anchor Rod Material
{anchorage.material}
Rod Size
{anchorage.count} rods, {anchorage.diameter}" diam.
Tension
Total Tension Force N
{(loads.P < 0 ? -loads.P : 0).toFixed(1)} kip
Tension Design Ratio
{anchor.tensionRatio.toFixed(2)} {anchor.tensionRatio <= 1.0 ? '✓' : 'X'}
Shear
Total Shear Force V
{Math.sqrt(loads.Vx ** 2 + loads.Vz ** 2).toFixed(1)} kip
Shear Design Ratio
{anchor.shearRatio.toFixed(2)} {anchor.shearRatio <= 1.0 ? '✓' : 'X'}
Interaction
Combined Stress Ratio
{anchor.interactionRatio.toFixed(2)} {anchor.isSafe ? '✓' : 'X'}
{anchor.isSafe &&
ANCHORAGE DESIGN IS OK
}
);
};