# @dora-cell/ghl

Embeddable GoHighLevel (GHL) VoIP Dialer and Call Bubble widget powered by the `@dora-cell/sdk`.

## Quick Start (CDN Installation)

You can embed the complete DoraCell VoIP dialer across your GoHighLevel agency using just **two tags**. No hosting or build step is required on your end!

### 1. Custom CSS Field
In your GoHighLevel **Agency Settings → Company → Custom CSS** (under the Whitelabel tab), paste the following import:
```css
@import url("https://cdn.jsdelivr.net/npm/@dora-cell/ghl@latest/dist/core.css");
```

### 2. Custom JS Field
In your GoHighLevel **Agency Settings → Company → Custom JS** (under the Whitelabel tab), paste the following script:
```html
<script src="https://cdn.jsdelivr.net/npm/@dora-cell/ghl@latest/dist/core.js"></script>
```

---

## Environments

### Production (`core.js`)
* Automatically connects to the live DoraCell production environment (`https://api.dora.ng/v1`).
* Clean user interface without environment selection controls.
```html
<script src="https://cdn.jsdelivr.net/npm/@dora-cell/ghl@latest/dist/core.js"></script>
```

### Staging / Development (`core.staging.js`)
* Retains the environment selector dropdown (`Staging` vs `Production`) for testing and QA.
```html
<script src="https://cdn.jsdelivr.net/npm/@dora-cell/ghl@latest/dist/core.staging.js"></script>
```

---

## Alternative CDNs
If you prefer an alternative global CDN provider, you can also load the files via:
* **UNPKG**: `https://unpkg.com/@dora-cell/ghl@latest/dist/core.js` and `https://unpkg.com/@dora-cell/ghl@latest/dist/core.css`
* **esm.sh** (Note: `?raw` parameter required for classic script tags): `https://esm.sh/@dora-cell/ghl@latest/dist/core.js?raw` and `https://esm.sh/@dora-cell/ghl@latest/dist/core.css`

## Features
* **Floating Phone FAB**: Easy toggle access from bottom right of any GHL page.
* **Full Dialer Panel**: Extension selector, credit balance badge, keypad grid, and dynamic loading states.
* **Call Bubble**: Floating, collapsible call controller showing duration, mute/answer controls, and remote audio streaming.
* **Persistent Session**: Automatically restores authentication across browser refreshes and page navigations.
