`;
// Event listener for checkbox (needs to be attached after innerHTML reflow)
// We'll trust the parent re-render or attach globally for now to avoid complexity in this simple render loop.
// Actually, let's attach immediately after this loop finishes or use a delegate.
list.appendChild(row);
});
// Delegate listener
list.onchange = (e) => {
if (e.target.classList.contains('chk-pet-feed')) {
const id = e.target.getAttribute('data-id');
if (!MB.automation.pets) MB.automation.pets = {};
if (!MB.automation.pets[id]) MB.automation.pets[id] = {};
MB.automation.pets[id].autoFeed = e.target.checked;
console.log(`[MagicBot] Pet ${id} Auto-Feed: ${e.target.checked}`);
}
};
container.appendChild(list);
}
};