// Adset detail — right pane function AdsetDetail({ adsetId, onClose, onBack }) { const as = window.FABCOM_DATA.adsets.find(x => x.id === adsetId); if (!as) return null; const c = window.FABCOM_DATA.campaigns.find(x => x.id === as.campaign_id); const acc = window.FABCOM_DATA.accounts.find(a => a.id === as.account_id); const ads = window.FABCOM_DATA.ads.filter(a => a.adset_id === as.id); const history = window.FABCOM_DATA.history.filter(h => h.entity_id === as.id).slice(0, 12); return (
onBack("campaign", c.id)}, {label: as.name}, ]}/>
{as.id}

{as.name}

{/* Settings grid */}
Budget & Bid
Targeting
{/* Linked ads */}
Linked ads ({ads.length})
{ads.map(ad => (
{ad.headline}
{(ad.cta||"—").replace("_"," ")} {ad.id}
))}
{/* History */}
History · all changes to this adset
{history.length === 0 ? (
No recorded changes.
) : ( {history.map(h => ( ))}
When Actor Field Before → After
{window.timeAgo(h.ts)}
{window.formatFullTs(h.ts)}
{h.actor} {h.field}
)}
); } function Field({ label, value, mono }) { return (
{label}
{value}
); } Object.assign(window, { AdsetDetail });