Create a block that handles the _Complete Lesson_, _Reset Lesson_ and _Next Lesson_ functionality. Each button block should support configuration of the following settings:
The parent block should support the following ~_Visibility_~ _Available Actions_ settings:
true)true)~~The _Complete Lesson_ button is always displayed.~
The _Complete Lesson_ button is always displayed for an enrolled user who has met the necessary conditions.
The _Next Lesson_ button is always displayed, regardless of whether or not the user is enrolled.
The logic for determining the visibility of the buttons on the frontend should be the same as it is for the legacy buttons. If more than one button is displayed (e.g. _Reset Lesson_, _Next Lesson_), they should be beside each other.
_Although the visibility of the existing _Reset Lesson_ button is tied to the _Allow user to retake the quiz_ setting, this seems like a nonsensical association that we should not carry over to this block._
Notices displayed as part of the button functionality (for example, _Congratulations! You have passed this lesson._ displaying after clicking on _Complete Lesson_) should not be part of the block and will be handled separately. This is so that notices aren't displayed at potentially odd locations on the page.
The block replaces these buttons:



As per a design discussion, the block toolbar should enable switching between the different views. If either the _Reset Lesson button_ or _Next Lesson button_ settings are disabled, the toolbar updates appropriately. If both are disabled, then the toolbar switcher should be hidden.
_Enable an enrolled user to perform specific actions for a lesson._
_Enable an enrolled user to mark the lesson as complete._
_Enable a user to move to the next lesson._
_Enable an enrolled user to reset their progress in the lesson._
Lesson Actions container block with fixed inner blocks and a lesson preview status (In Progress, Completed)
Lesson Actions parent block:

Inner button block selected:

Some changes:
Visibility settings panel could be called something like Completed Lesson ActionsAs per a design review, the following changes should be made to the current design:
➤ donnapep commented:
This card is responsible for handling the view state and highlighting the buttons in the selected state.
@donnapep, could you explain the following item?
Padding for Next Lesson and Reset Lesson blocks should be the same.
@donnapep, could you explain the following item?
Padding for Next Lesson and Reset Lesson blocks should be the same.
This was just an issue with the design images, should be all good with using the button blocks.
Most helpful comment
Editor Design
Lesson Actionscontainer block with fixed inner blocks and a lesson preview status (In Progress,Completed)Lesson Actions parent block:

Inner button block selected:

Clickable prototype in Figma
Some changes:
Visibilitysettings panel could be called something likeCompleted Lesson Actions