module Playbook::Order

def order_props

rubocop:disable Style/IfInsideElse
def order_props
  selected_props = order_options.keys.select { |sk| try(sk) }
  return nil unless selected_props.present?
  selected_props.map do |k|
    order_value = send(k)
    if order_value.is_a?(Hash)
      order_value.map do |media_size, order_size_value|
        "flex_order_#{media_size}_#{order_size_value}" if order_values.include? order_size_value.to_s
      end
    else
      "flex_order_#{order_value}" if order_values.include? order_value.to_s
    end
  end.compact.join(" ")
end