import GridData from '../grid.js';
import { State } from '../primitives.js';
import AreaNumberSymbol from '../symbols/areaNumberSymbol.js';
import CustomTextSymbol from '../symbols/customTextSymbol.js';
import Rule from './rule.js';
class UndercluedRule extends Rule {
    /**
     * **Underclued Grid: Mark only what is definitely true**
     *
     * This rule validates answers based on the provided solution.
     */
    constructor() {
        super();
    }
    get id() {
        return `underclued`;
    }
    get explanation() {
        return `*Underclued Grid:* Mark only what is definitely true`;
    }
    createExampleGrid() {
        return UndercluedRule.EXAMPLE_GRID;
    }
    get searchVariants() {
        return UndercluedRule.SEARCH_VARIANTS;
    }
    validateGrid(_grid) {
        return { state: State.Incomplete };
    }
    copyWith(_) {
        return new UndercluedRule();
    }
    get validateWithSolution() {
        return true;
    }
    get isSingleton() {
        return true;
    }
}
Object.defineProperty(UndercluedRule, "EXAMPLE_GRID", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: Object.freeze(GridData.create(['nbnnn', 'bwbnn', 'nbnnn', 'wwwnn'])
        .addSymbol(new AreaNumberSymbol(1, 1, 1))
        .addSymbol(new AreaNumberSymbol(0, 3, 4))
        .addSymbol(new CustomTextSymbol('', GridData.create([]), 0, 2, '?'))
        .addSymbol(new CustomTextSymbol('', GridData.create([]), 2, 2, '?'))
        .addSymbol(new CustomTextSymbol('', GridData.create([]), 3, 3, '?')))
});
Object.defineProperty(UndercluedRule, "SEARCH_VARIANTS", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: [
        new UndercluedRule().searchVariant(),
    ]
});
export default UndercluedRule;
export const instance = new UndercluedRule();
