// Copyright 2025 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
import { getEventValue } from '../../prop-adapters/event-value.js';
import { prepareSpreadAttrSlot } from '../../prop-adapters/spread.js';
export const __etAttrPlanMap = Object.create(null);
export function adaptEventAttrSlot(handleId, attrSlotIndex, value, _context) {
    if (value === null || value === undefined || value === false) {
        return null;
    }
    return getEventValue(handleId, attrSlotIndex);
}
export function adaptSpreadAttrSlot(handleId, attrSlotIndex, value, context) {
    return prepareSpreadAttrSlot(handleId, attrSlotIndex, value, context);
}
export function clearEtAttrPlanMap() {
    // The compiled output assigns into the exported side table directly, so the
    // object identity must stay stable when tests or teardown clear state.
    for (const templateKey in __etAttrPlanMap) {
        delete __etAttrPlanMap[templateKey];
    }
}
//# sourceMappingURL=attr-slot-plan.js.map