@use "../../modules/misc/resources/color-state" as color_state_obj;
@use "./list-properties" as list_props;

%list_item_stle {
  border-width: 1px;
  border-style: solid;
  border-color: color_state_obj.get_value(list_props.$color_map, "normal", "border");

  .#{$custom_list_class_name} {
    @include element((), "item") {
      background-color: color_state_obj.get_value(list_props.$color_map, "normal", "background");

      &:not(:first-child) {
        border-bottom-width: 1px;
        border-bottom-style: solid;
        border-color: color_state_obj.get_value(list_props.$color_map, "normal", "border");
      }

      .text {
        color: color_state_obj.get_value(list_props.$color_map, "normal", "text");
      }

      @include modifiers((), "is-active") {
        background-color: color_state_obj.get_value(list_props.$color_map, "active", "background");

        &:not(:first-child) {
          border-bottom-color: color_state_obj.get_value(list_props.$color_map, "active", "border");
        }

        .text {
          color: color_state_obj.get_value(list_props.$color_map, "active", "text");
        }
      }
    }
  }
}

[data-theme=#{$DEFAULT_THEME_NAME}] {
  .#{$custom_list_class_name}-wrap {
    @extend %list_item_stle;
  }
}
