# Path: src/auale/gui/values/side.py
# class Side(Enum):
#     """Engine's playing side"""
# 
#     BOTH = Params(Rotation.BASE, True, True)
#     NEITHER = Params(Rotation.BASE, False, False)
#     NORTH = Params(Rotation.BASE, False, True)
#     SOUTH = Params(Rotation.ROTATED, True, False)
# 
#     @property
#     def is_south(self):
#         return self.value.south
# 
#     @property
#     def is_north(self):
#         return self.value.north
# 
#     @property
#     def rotation(self):
#         return self.value.rotation
# 
#     @property
#     def ordinal(self) -> int:
#         return list(self).index(self)
# 
#     @property
#     def nick(self):
#         return self.name.lower()
# 
#     @staticmethod
#     def value_of(nick: str) -> Enum:
#         return Side[nick.upper()]


from gi.repository import Gtk
from ..values import Side
#
# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.



@Gtk.Template(resource_path='/com/joansala/auale/gtk/dialogs/new_match_dialog.ui')
class NewMatchDialog(Gtk.Dialog):
    """Dialog to start a new match"""

    __gtype_name__ = 'NewMatchDialog'

    _south_button = Gtk.Template.Child('south_button')
    _north_button = Gtk.Template.Child('north_button')
    _watch_button = Gtk.Template.Child('watch_button')
    _edit_button = Gtk.Template.Child('edit_button')

    def __init__(self, window):
        super(NewMatchDialog, self).__init__()

        self._side = Side.SOUTH
        self.set_transient_for(window)
        self.connect('response', self.on_response)
        self.connect_button(self._edit_button, Side.NEITHER)
        self.connect_button(self._north_button, Side.SOUTH)

# Path: src/auale/gui/values/side.py
# class Side(Enum):
#     """Engine's playing side"""
# 
#     BOTH = Params(Rotation.BASE, True, True)
#     NEITHER = Params(Rotation.BASE, False, False)
#     NORTH = Params(Rotation.BASE, False, True)
#     SOUTH = Params(Rotation.ROTATED, True, False)
# 
#     @property
#     def is_south(self):
#         return self.value.south
# 
#     @property
#     def is_north(self):
#         return self.value.north
# 
#     @property
#     def rotation(self):
#         return self.value.rotation
# 
#     @property
#     def ordinal(self) -> int:
#         return list(self).index(self)
# 
#     @property
#     def nick(self):
#         return self.name.lower()
# 
#     @staticmethod
#     def value_of(nick: str) -> Enum:
#         return Side[nick.upper()]


# Path: src/auale/gui/dialogs/new_match_dialog.py
from gi.repository import Gtk
from ..values import Side

#
# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.



@Gtk.Template(resource_path='/com/joansala/auale/gtk/dialogs/new_match_dialog.ui')
class NewMatchDialog(Gtk.Dialog):
    """Dialog to start a new match"""

    __gtype_name__ = 'NewMatchDialog'

    _south_button = Gtk.Template.Child('south_button')
    _north_button = Gtk.Template.Child('north_button')
    _watch_button = Gtk.Template.Child('watch_button')
    _edit_button = Gtk.Template.Child('edit_button')

    def __init__(self, window):
        super(NewMatchDialog, self).__init__()

        self._side = Side.SOUTH
        self.set_transient_for(window)
        self.connect('response', self.on_response)
        self.connect_button(self._edit_button, Side.NEITHER)
        self.connect_button(self._north_button, Side.SOUTH)

        self.connect_button(self._south_button, Side.NORTH)