// Path: src/net/deltik/mc/signedit/integrations/SignEditValidator.java
// public interface SignEditValidator {
//     /**
//      * Ensure that the changed sign passes checks before saving
//      *
//      * @param proposedSign A changed sign that has not had {@link Sign#update()} called yet
//      */
//     void validate(Sign proposedSign);
// 
//     /**
//      * Import sign changes from a {@link SignChangeEvent} and ensure that they pass checks before saving
//      *
//      * @param signChangeEvent A sign change event in the validation phase (i.e. not passed in by an {@link EventHandler}
//      *                        with {@link EventPriority#MONITOR})
//      */
//     void validate(SignChangeEvent signChangeEvent);
// }
// 
// Path: src/net/deltik/mc/signedit/ArgParser.java
// public static final int[] ALL_LINES_SELECTED = new int[]{0, 1, 2, 3};
// 
// Path: src/net/deltik/mc/signedit/ArgParser.java
// public static final int[] NO_LINES_SELECTED = new int[0];


import net.deltik.mc.signedit.*;
import net.deltik.mc.signedit.integrations.SignEditValidator;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import javax.inject.Inject;
import java.util.Arrays;
import static net.deltik.mc.signedit.ArgParser.ALL_LINES_SELECTED;
import static net.deltik.mc.signedit.ArgParser.NO_LINES_SELECTED;
/*
 * Copyright (C) 2017-2021 Deltik <https://www.deltik.net/>
 *
 * This file is part of SignEdit for Bukkit.
 *
 * SignEdit for Bukkit is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * SignEdit for Bukkit is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with SignEdit for Bukkit.  If not, see <https://www.gnu.org/licenses/>.
 */

package net.deltik.mc.signedit.interactions;




public class CutSignEditInteraction implements SignEditInteraction {
    private final ArgParser argParser;
    private final SignText sourceSign;
    private final SignText clipboard;
    private final SignTextClipboardManager clipboardManager;
    private final SignTextHistoryManager historyManager;
    private final ChatComms comms;

    @Inject
    public CutSignEditInteraction(
            ArgParser argParser,
            SignText signText,
            SignEditValidator validator,
            SignTextClipboardManager clipboardManager,
            SignTextHistoryManager historyManager,
            ChatComms comms) {
        this.argParser = argParser;
        this.sourceSign = signText;
        this.clipboard = new SignText(validator);
// Path: src/net/deltik/mc/signedit/integrations/SignEditValidator.java
// public interface SignEditValidator {
//     /**
//      * Ensure that the changed sign passes checks before saving
//      *
//      * @param proposedSign A changed sign that has not had {@link Sign#update()} called yet
//      */
//     void validate(Sign proposedSign);
// 
//     /**
//      * Import sign changes from a {@link SignChangeEvent} and ensure that they pass checks before saving
//      *
//      * @param signChangeEvent A sign change event in the validation phase (i.e. not passed in by an {@link EventHandler}
//      *                        with {@link EventPriority#MONITOR})
//      */
//     void validate(SignChangeEvent signChangeEvent);
// }
// 
// Path: src/net/deltik/mc/signedit/ArgParser.java
// public static final int[] ALL_LINES_SELECTED = new int[]{0, 1, 2, 3};
// 
// Path: src/net/deltik/mc/signedit/ArgParser.java
// public static final int[] NO_LINES_SELECTED = new int[0];


// Path: src/net/deltik/mc/signedit/interactions/CutSignEditInteraction.java
import net.deltik.mc.signedit.*;
import net.deltik.mc.signedit.integrations.SignEditValidator;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import javax.inject.Inject;
import java.util.Arrays;
import static net.deltik.mc.signedit.ArgParser.ALL_LINES_SELECTED;
import static net.deltik.mc.signedit.ArgParser.NO_LINES_SELECTED;

/*
 * Copyright (C) 2017-2021 Deltik <https://www.deltik.net/>
 *
 * This file is part of SignEdit for Bukkit.
 *
 * SignEdit for Bukkit is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * SignEdit for Bukkit is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with SignEdit for Bukkit.  If not, see <https://www.gnu.org/licenses/>.
 */

package net.deltik.mc.signedit.interactions;




public class CutSignEditInteraction implements SignEditInteraction {
    private final ArgParser argParser;
    private final SignText sourceSign;
    private final SignText clipboard;
    private final SignTextClipboardManager clipboardManager;
    private final SignTextHistoryManager historyManager;
    private final ChatComms comms;

    @Inject
    public CutSignEditInteraction(
            ArgParser argParser,
            SignText signText,
            SignEditValidator validator,
            SignTextClipboardManager clipboardManager,
            SignTextHistoryManager historyManager,
            ChatComms comms) {
        this.argParser = argParser;
        this.sourceSign = signText;
        this.clipboard = new SignText(validator);
        this.clipboardManager = clipboardManager;