import { IndexedPickerFieldStepHelper } from './indexed-picker.js';
import { FieldPicker } from '../../../../blockly/fields/field-picker.js';
export class QuotePickerFieldStepHelper extends IndexedPickerFieldStepHelper {
    testCase(challenge, step) {
        const field = this.getField(challenge, step);
        return field && field.constructor === FieldPicker;
    }
    getItem(value, targetItems) {
        const shadow = this.getShadowElement();
        if (!shadow || !targetItems) {
            return;
        }
        const id = this.getIdFromValue(value, targetItems);
        const items = shadow.querySelectorAll('.item');
        const item = Array.from(items).find(item => item.id === id);
        return item;
    }
}
//# sourceMappingURL=quote-picker.js.map