module Playbook::AlignItems

def self.included(base)

def self.included(base)
  base.prop :align_items
end

def align_items_options

def align_items_options
  {
    align_items: "align_items",
  }
end

def align_items_props

rubocop:disable Style/IfInsideElse
def align_items_props
  selected_props = align_items_options.keys.select { |sk| try(sk) }
  return nil unless selected_props.present?
  selected_props.map do |k|
    align_items_value = send(k)
    if align_items_value.is_a?(Hash)
      align_items_value.map do |media_size, align_value|
        "align_items_#{media_size}_#{align_value.underscore}" if align_items_values.include? align_value.to_s
      end
    else
      "align_items_#{align_items_value.underscore}" if align_items_values.include? align_items_value
    end
  end.compact.join(" ")
end

def align_items_values

def align_items_values
  %w[flexStart flexEnd start end center baseline stretch]
end