% ------------------------------------------------------------------------------
% Copyright (c) 2019, 2026 Contributors to the Eclipse Foundation
%
% See the NOTICE file(s) distributed with this work for additional
% information regarding copyright ownership.
%
% This program and the accompanying materials are made available under the terms
% of the MIT License which is available at https://opensource.org/licenses/MIT
%
% SPDX-License-Identifier: MIT
% ------------------------------------------------------------------------------
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, arrows, automata, positioning, shapes, shapes.misc}
\usepackage[paperwidth=40in, paperheight=20in]{geometry}

\begin{document}
\pagestyle{empty}

\begin{tikzpicture}[
    auto,
    ->,
    node distance=7cm,
    every state/.style={ellipse, semithick, fill=black!5, minimum size=2cm, font=\Large},
    initial distance=1.2cm,
    every initial by arrow/.style={-{Stealth[scale=1.4]}},
    initial text=,
    transform shape,
    double distance=2pt,
    every loop/.style={min distance=10mm}
]

\node[state, initial]    (A) {\emph{ClosedGreen}};
\node[state, right of=A] (B) {\emph{PartiallyOpenGreen}};
\node[state, right of=B] (C) {\emph{OpenGreen}};
\node[state, below of=A] (D) {\emph{ClosedRed}};
\node[state, right of=D] (E) {\emph{PartiallyOpenRed}};
\node[state, right of=E] (F) {\emph{OpenRed}};

\path[-{Stealth[scale=1.4]}]
    (A) edge[bend left, above] node[align=center,above] {\texttt{partially\_opened}} (B)
    (B) edge[bend left, above] node[align=center,below]  {\texttt{closed}} (A)
    (B) edge[bend left, above] node[align=center,above] {\texttt{opened}} (C)
    (C) edge[bend left, above] node[align=center,below] {\texttt{partially\_opened}} (B)
    (D) edge[bend left, above] node[align=center,above] {\texttt{partially\_opened}} (E)
    (E) edge[bend left, above] node[align=center,below]  {\texttt{closed}} (D)
    (E) edge[bend left, above] node[align=center,above] {\texttt{opened}} (F)
    (F) edge[bend left, above] node[align=center,below] {\texttt{partially\_opened}} (E)

    (A) edge[bend left, above] node[align=center,right] {\texttt{to\_red}} (D)
    (D) edge[bend left, below] node[align=center,left] {\texttt{to\_green}} (A)
    (B) edge[bend left, above] node[align=center,right] {\texttt{to\_red}} (E)
    (E) edge[bend left, below] node[align=center,left] {\texttt{to\_green}} (B)
    (C) edge[bend left, above] node[align=center,right] {\texttt{to\_red}} (F)
    (F) edge[bend left, below] node[align=center,left] {\texttt{to\_green}} (C)
;

\end{tikzpicture}
\end{document}
