@inherits AComponent
@{try{if (DisplayContent){
<!--=============================================================================================-->
<div id="bookcard_HeaderDIV">
   <span class="page_ImpressiveTitle">@(IsInAddingMode ? "Add new book to registry" : "Correct book properties")</span>
   <table class="ml-2">
      <tbody>
         <tr>
            <td>
               <AButton Classes_0="btn btn-secondary"
                        Title="Close add-book form (quit subpage)" AccessKey="c" TabIndex=1
                        ON_Click=@CancelButton_OnClick><u>C</u>ANCEL</AButton>
            </td>
            <td></td>
            <td>
               <span class="faint_text">(</span><span class="symbolic_bold_text">&#x00D7;</span><span class="faint_text">)</span>
            </td>
         </tr>
      </tbody>
   </table>
</div>
<table style="width: 100%">
   <thead>
      <tr style="vertical-align: bottom">
         <td /><td>&nbsp;</td>
         <td /><td>&nbsp;</td>
         <td class="bookcard_RequisiteCaptionTD width_100">
            <div style="display: flex; align-items: flex-end">
               <span style="margin-left: 3px">Description:</span>
               <AButton ID="bookcard_SelectDescriptionBUTTON" TabIndex=12
                        Title="Select all content (memo-box)"
                        ON_Click=@SelectDescriptionButton_OnClick>Select all</AButton>
            </div>
         </td>
      </tr>
   </thead>
   <tbody>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">Book-name:</td><td />
         <td>
            <AEditBox @ref=@BookNameEdit InputClasses="bookcard_RequisiteINPUT"
                      ResetPresence=ElementPresence.Available TabIndex=2
                      InputValidationCallback=@BookName_Validate
                      ON_Focus=@(() => EditBox_VMDisplay(BookNameEdit))
                      ON_Input=@(() => EditBox_VMDisplay(BookNameEdit,true)) />
         </td>
         <td />
         <td rowspan="16" style="height: inherit">
            <div style="height: 100%">
               <textarea @ref=@DescriptionTEXTAREA id="bookcard_DescriptionTEXTAREA" tabindex="11"
                         @onfocus=@InputField_VMClear
                         @oninput=@Description_OnInput>@Description</textarea><br>
            </div>
         </td>
      </tr>
      <tr style="height: 0"><td /></tr>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">ISBN:</td><td />
         <td>
            <AEditBox @ref=@ISBNEdit InputClasses="bookcard_RequisiteINPUT"
                      ResetPresence=ElementPresence.Available TabIndex=3
                      InputValidationCallback=@ISBN_Validate
                      ON_Focus=@(() => EditBox_VMDisplay(ISBNEdit))
                      ON_Input=@(() => EditBox_VMDisplay(ISBNEdit,true)) />
         </td>
      </tr>
      <tr style="height: 0"><td /></tr>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">Year of<br>release:</td><td />
         <td>
            <AEditBox @ref=@ReleaseYearEdit InputClasses="bookcard_RequisiteINPUT"
                      ResetPresence=ElementPresence.Available TabIndex=4
                      InputValidationCallback=@ReleaseYear_Validate
                      ON_Focus=@(() => EditBox_VMDisplay(ReleaseYearEdit))
                      ON_Input=@(() => EditBox_VMDisplay(ReleaseYearEdit,true)) />
         </td>
      </tr>
      <tr style="height: 0"><td /></tr>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">Author:</td><td />
         <td>
            <ADropDownList_IdName @ref=@AuthorDDL SelectClasses="bookcard_RequisiteSELECT"
                                  ResetPresence=ElementPresence.Available
                                  ResetControlType=ResetControlType.UpReset
                                  InputValidationCallback=@AuthorId_Validate
                                  TabIndex=5
                                  ON_Focus=@(() => DropDownList_VMDisplay(AuthorDDL))
                                  ON_Change=@(() => DropDownList_VMDisplay(AuthorDDL,true)) />
         </td>
      </tr>
      <tr style="height: 0"><td /></tr>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">Category:</td><td />
         <td>
            <ADropDownList_IdName @ref=@CategoryDDL SelectClasses="bookcard_RequisiteSELECT"
                                  ResetPresence=ElementPresence.Available
                                  ResetControlType=ResetControlType.UpReset
                                  InputValidationCallback=@CategoryId_Validate
                                  TabIndex=6
                                  ON_Focus=@(() => DropDownList_VMDisplay(CategoryDDL))
                                  ON_Change=@(() => DropDownList_VMDisplay(CategoryDDL,true)) />
         </td>
      </tr>
      <tr style="height: 0"><td /></tr>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">Genre:</td><td />
         <td>
            <ADropDownList_IdName @ref=@GenreDDL SelectClasses="bookcard_RequisiteSELECT"
                                  ResetPresence=ElementPresence.Available
                                  ResetControlType=ResetControlType.UpReset
                                  InputValidationCallback=@GenreId_Validate
                                  TabIndex=7
                                  ON_Focus=@(() => DropDownList_VMDisplay(GenreDDL))
                                  ON_Change=@(() => DropDownList_VMDisplay(GenreDDL,true)) />
         </td>
      </tr>
      <tr style="height: 0"><td /></tr>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">Publisher:</td><td />
         <td>
            <ADropDownList_IdName @ref=@PublisherDDL SelectClasses="bookcard_RequisiteSELECT"
                                  ResetPresence=ElementPresence.Available
                                  ResetControlType=ResetControlType.UpReset
                                  InputValidationCallback=@PublisherId_Validate
                                  TabIndex=8
                                  ON_Focus=@(() => DropDownList_VMDisplay(PublisherDDL))
                                  ON_Change=@(() => DropDownList_VMDisplay(PublisherDDL,true)) />
         </td>
      </tr>
      <tr style="height: 0"><td /></tr>
      <tr style="height: 0">
         <td class="bookcard_RequisiteCaptionTD">Series:</td><td />
         <td>
            <ADropDownList_IdName @ref=@SeriesDDL SelectClasses="bookcard_RequisiteSELECT"
                                  ResetPresence=ElementPresence.Available
                                  ResetControlType=ResetControlType.UpReset
                                  InputValidationCallback=@SeriesId_Validate
                                  TabIndex=9
                                  ON_Focus=@(() => DropDownList_VMDisplay(SeriesDDL))
                                  ON_Change=@(() => DropDownList_VMDisplay(SeriesDDL,true)) />
         </td>
      </tr>
      <tr><td style="height: 100%" /></tr>
   </tbody>
</table>
<hr class="page_ShallowHR">
<div style="display: flex">
   <span class="page_HotKeySPAN">F2</span>
   <span class="page_HotKeyColumnSPAN">:</span>
   <AButton @ref=@ApplyButton Classes_0="btn btn-primary"
            Title=@ApplyButtonTitle TabIndex=13
            Enabled=@IsForCorrection
            ON_Click_A=@ApplyButton_OnClick_A>@ApplyButtonText</AButton>
   <span class="page_HotKeySPAN ml-3">F9</span>
   <span class="page_HotKeyColumnSPAN">:</span>
   <AButton @ref=@ShowErrorsButton Classes_0="btn btn-secondary"
            Title="Forced validation (all fields)"
            ON_Click_A=@ShowFieldErrors_OnClick_A>SHOW ERRORS</AButton>
   <span class="faint_bold_text align_self_center ml-3">@InputChangeMessage</span>
</div>
<AErrorList @ref=@ErrorList ContainerClasses="mt-2"/>
<!--=============================================================================================-->
}}catch(Exception e){ProcessRenderingError(GetType(),e);}}
