// Path: src/net/orekyuu/riho/character/FacePattern.java
// public enum FacePattern {
//     NORMAL, SMILE1, SMILE2, AWAWA, FUN, JITO, SURPRISE, SYUN;
// }
// 
// Path: src/net/orekyuu/riho/character/Loop.java
// public class Loop {
//     private final int loopCount;
//     private static final Loop INFINITE = new Loop(-1);
//     private static final Loop ONCE = Loop.of(1);
// 
//     private Loop(int count) {
//         this.loopCount = count;
//     }
// 
//     public static Loop of(int loopCount) {
//         if (loopCount < 0) {
//             throw new IllegalArgumentException();
//         }
//         return new Loop(loopCount);
//     }
// 
//     public boolean isInfinite() {
//         return this == INFINITE;
//     }
// 
//     public int getLoopCount() {
//         return loopCount;
//     }
// 
//     public static Loop infinite() {
//         return INFINITE;
//     }
// 
//     public static Loop once() {
//         return ONCE;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         Loop loop = (Loop) o;
//         return loopCount == loop.loopCount;
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hash(loopCount);
//     }
// }
// 
// Path: src/net/orekyuu/riho/character/Reaction.java
// public class Reaction {
//     private final Emotion emotion;
//     private final Loop emotionLoop;
//     private final Duration duration ;
//     private final FacePattern facePattern;
// 
//     public Reaction(FacePattern facePattern, Duration duration, Emotion emotion, Loop emotionLoop) {
//         this.emotion = emotion;
//         this.emotionLoop = emotionLoop;
//         this.duration = duration;
//         this.facePattern = facePattern;
//     }
// 
//     public static Reaction of(FacePattern facePattern, Duration duration) {
//         return of(facePattern, duration, Emotion.NONE, Loop.once());
//     }
// 
//     public static Reaction of(FacePattern facePattern, Duration duration, Emotion emotion, Loop emotionLoop) {
//         return new Reaction(facePattern, duration, emotion, emotionLoop);
//     }
// 
//     public Emotion getEmotion() {
//         return emotion;
//     }
// 
//     public Loop getEmotionLoop() {
//         return emotionLoop;
//     }
// 
//     public Duration getDuration() {
//         return duration;
//     }
// 
//     public FacePattern getFacePattern() {
//         return facePattern;
//     }
// }
// 
// Path: src/net/orekyuu/riho/emotion/Emotion.java
// public enum Emotion {
//     NONE, QUESTION, DROP, MOJYA, SWEAT, SURPRISED, ANGER, SAD
// }
// 
// Path: src/net/orekyuu/riho/topics/RihoReactionNotifier.java
// public interface RihoReactionNotifier {
// 
//     Topic<RihoReactionNotifier> REACTION_NOTIFIER = Topic.create("riho reaction", RihoReactionNotifier.class);
// 
//     void reaction(Reaction reaction);
// }


import com.intellij.openapi.project.Project;
import com.intellij.refactoring.listeners.RefactoringEventData;
import com.intellij.refactoring.listeners.RefactoringEventListener;
import net.orekyuu.riho.character.FacePattern;
import net.orekyuu.riho.character.Loop;
import net.orekyuu.riho.character.Reaction;
import net.orekyuu.riho.emotion.Emotion;
import net.orekyuu.riho.topics.RihoReactionNotifier;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.time.Duration;
package net.orekyuu.riho.events;



public class RefactoringListener implements RefactoringEventListener {

    private final Project project;

    public RefactoringListener(Project project) {
        this.project = project;
    }

    @Override
    public void refactoringStarted(@NotNull String s, @Nullable RefactoringEventData refactoringEventData) {
    }

    @Override
    public void refactoringDone(@NotNull String s, @Nullable RefactoringEventData refactoringEventData) {
        RihoReactionNotifier publisher = project.getMessageBus().syncPublisher(RihoReactionNotifier.REACTION_NOTIFIER);
        publisher.reaction(Reaction.of(FacePattern.SMILE1, Duration.ofSeconds(3)));
    }

    @Override
    public void conflictsDetected(@NotNull String s, @NotNull RefactoringEventData refactoringEventData) {
        RihoReactionNotifier publisher = project.getMessageBus().syncPublisher(RihoReactionNotifier.REACTION_NOTIFIER);
// Path: src/net/orekyuu/riho/character/FacePattern.java
// public enum FacePattern {
//     NORMAL, SMILE1, SMILE2, AWAWA, FUN, JITO, SURPRISE, SYUN;
// }
// 
// Path: src/net/orekyuu/riho/character/Loop.java
// public class Loop {
//     private final int loopCount;
//     private static final Loop INFINITE = new Loop(-1);
//     private static final Loop ONCE = Loop.of(1);
// 
//     private Loop(int count) {
//         this.loopCount = count;
//     }
// 
//     public static Loop of(int loopCount) {
//         if (loopCount < 0) {
//             throw new IllegalArgumentException();
//         }
//         return new Loop(loopCount);
//     }
// 
//     public boolean isInfinite() {
//         return this == INFINITE;
//     }
// 
//     public int getLoopCount() {
//         return loopCount;
//     }
// 
//     public static Loop infinite() {
//         return INFINITE;
//     }
// 
//     public static Loop once() {
//         return ONCE;
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         Loop loop = (Loop) o;
//         return loopCount == loop.loopCount;
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hash(loopCount);
//     }
// }
// 
// Path: src/net/orekyuu/riho/character/Reaction.java
// public class Reaction {
//     private final Emotion emotion;
//     private final Loop emotionLoop;
//     private final Duration duration ;
//     private final FacePattern facePattern;
// 
//     public Reaction(FacePattern facePattern, Duration duration, Emotion emotion, Loop emotionLoop) {
//         this.emotion = emotion;
//         this.emotionLoop = emotionLoop;
//         this.duration = duration;
//         this.facePattern = facePattern;
//     }
// 
//     public static Reaction of(FacePattern facePattern, Duration duration) {
//         return of(facePattern, duration, Emotion.NONE, Loop.once());
//     }
// 
//     public static Reaction of(FacePattern facePattern, Duration duration, Emotion emotion, Loop emotionLoop) {
//         return new Reaction(facePattern, duration, emotion, emotionLoop);
//     }
// 
//     public Emotion getEmotion() {
//         return emotion;
//     }
// 
//     public Loop getEmotionLoop() {
//         return emotionLoop;
//     }
// 
//     public Duration getDuration() {
//         return duration;
//     }
// 
//     public FacePattern getFacePattern() {
//         return facePattern;
//     }
// }
// 
// Path: src/net/orekyuu/riho/emotion/Emotion.java
// public enum Emotion {
//     NONE, QUESTION, DROP, MOJYA, SWEAT, SURPRISED, ANGER, SAD
// }
// 
// Path: src/net/orekyuu/riho/topics/RihoReactionNotifier.java
// public interface RihoReactionNotifier {
// 
//     Topic<RihoReactionNotifier> REACTION_NOTIFIER = Topic.create("riho reaction", RihoReactionNotifier.class);
// 
//     void reaction(Reaction reaction);
// }


// Path: src/net/orekyuu/riho/events/RefactoringListener.java
import com.intellij.openapi.project.Project;
import com.intellij.refactoring.listeners.RefactoringEventData;
import com.intellij.refactoring.listeners.RefactoringEventListener;
import net.orekyuu.riho.character.FacePattern;
import net.orekyuu.riho.character.Loop;
import net.orekyuu.riho.character.Reaction;
import net.orekyuu.riho.emotion.Emotion;
import net.orekyuu.riho.topics.RihoReactionNotifier;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.time.Duration;

package net.orekyuu.riho.events;



public class RefactoringListener implements RefactoringEventListener {

    private final Project project;

    public RefactoringListener(Project project) {
        this.project = project;
    }

    @Override
    public void refactoringStarted(@NotNull String s, @Nullable RefactoringEventData refactoringEventData) {
    }

    @Override
    public void refactoringDone(@NotNull String s, @Nullable RefactoringEventData refactoringEventData) {
        RihoReactionNotifier publisher = project.getMessageBus().syncPublisher(RihoReactionNotifier.REACTION_NOTIFIER);
        publisher.reaction(Reaction.of(FacePattern.SMILE1, Duration.ofSeconds(3)));
    }

    @Override
    public void conflictsDetected(@NotNull String s, @NotNull RefactoringEventData refactoringEventData) {
        RihoReactionNotifier publisher = project.getMessageBus().syncPublisher(RihoReactionNotifier.REACTION_NOTIFIER);
        publisher.reaction(Reaction.of(FacePattern.JITO, Duration.ofSeconds(3), Emotion.MOJYA, Loop.once()));