# XWUIShippingRateCalculator

A destination/weight shipping rate estimator: a small form (ZIP/postal code, country, package weight) plus a "Calculate" button. When `data.rates` is populated they're shown as selectable radio cards (carrier, service, ETA, price). Calculating fires `onCalculate` so a host page can fetch real carrier rates and re-populate `data.rates`.

## Events

| Event | Callback | Subscriber | `detail` |
|---|---|---|---|
| `xwui-shipping-rate-calculator:calculate` | `onCalculate` | `onCalculate(handler)` | `{ zip, country, weightKg }` |
| `xwui-shipping-rate-calculator:rate-select` | `onRateSelect` | `onRateSelect(handler)` | The selected `XWUIShippingRate` |

## Usage

```ts
import { XWUIShippingRateCalculator } from '@exonware/xwui/industry';

const calc = new XWUIShippingRateCalculator(host, {});

calc.onCalculate(async (zip, country, weightKg) => {
  const rates = await api.getShippingRates({ zip, country, weightKg });
  // re-render with rates, e.g. by constructing a new instance with data.rates = rates
});
```

```api
```
