% Maintained by Matthew Bertucci, 2024-present
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
\ProvidesExplFile{keythms-amsart-support}{\@keythms@date}{\@keythms@version}
  {keytheorems~support~for~the~amsart~class}

\tl_use:N \c__keythms_support_AMSshared_tl

% redefine inherit-style=remark
\tl_gset:Nn \g__keythms_thmstyle_remark_metakeys_tl
  {
    bodyfont      = \normalfont,
    headfont      = \itshape,
  }

\bool_case:n
  {
    { \__keythms_if_classloaded_p:n { acmart } }
      {
        \keytheoremset{overload} % since acmart predefines several theorems at begindocument
        \prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
          {
            bodyfont      = \@acmplainbodyfont,
            headfont      = \@acmplainheadfont,
            headindent    = \@acmplainindent,
            notefont      = \@acmplainnotefont,
            postheadspace = .5em,
          }
        \tl_new:N \g__keythms_thmstyle_acmplain_metakeys_tl
        \tl_new:N \g__keythms_thmstyle_acmdefinition_metakeys_tl
        \tl_gset:Nn \g__keythms_thmstyle_acmdefinition_metakeys_tl
          {
            bodyfont   = \@acmdefinitionbodyfont,
            headindent = \@acmdefinitionindent,
            headfont   = \@acmdefinitionheadfont,
            notefont   = \@acmdefinitionnotefont,
          }
      }
    { \__keythms_if_classloaded_p:n { aomart } }
      {
        \prop_gput_from_keyval:Nn \g__keythms_thmstyle_defaultkeys_prop
          {
            bodyfont      = \sishape,
            headfont      = \scshape,
            headindent    = \parindent,
            notefont      = \normalfont,
            postheadspace = 0.5em,
            spaceabove    = 0.5\linespacing,
            spacebelow    = 0.5\linespacing,
          }
        \tl_gset:Nn \g__keythms_thmstyle_definition_metakeys_tl
          {
            bodyfont      = \upshape,
            headfont      = \sishape,
            headindent    = \parindent,
            notefont      = \normalfont,
            postheadspace = 0.5em,
            spaceabove    = 0.5\linespacing,
            spacebelow    = 0.5\linespacing,
          }
        \tl_gset:Nn \g__keythms_thmstyle_remark_metakeys_tl
          {
            bodyfont      = \upshape,
            headfont      = \sishape,
            headindent    = \parindent,
            notefont      = \normalfont,
            postheadspace = 0.5em,
            spaceabove    = 0.5\linespacing,
            spacebelow    = 0.5\linespacing,
          }
      }
  }

\file_input_stop: