You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: application_helper.rb
    path of file: ./repos/gdpr_rails/app/helpers/policy_manager
    
    the code of the file until where you have to start completion: module PolicyManager
  module ApplicationHelper

    def bootstrap_class_for flash_type
      { success: "alert-success", error: "alert-danger", alert: "alert-warning", notice: "alert-info" }[flash_type.to_sym] || flash_type.to_s
    end

    def flash_messages(opts = {})

      flash.each do |msg_type, message|
        flash.delete(msg_type)
        concat(content_tag(:div, message, class: "alert #{bootstrap_class_for(msg_type)}") do 
          concat content_tag(:but
    
    def flash_messages(opts = {})

      flash.each do |msg_type, message|
        flash.delete(msg_type)
        concat(content_tag(:div, message, class: "alert #{bootstrap_class_for(msg_type)}") do 
          concat content_tag(:button, "<i class='fa fa-times-circle'></i>".html_safe, class: "close", data: { dismiss: 'alert' })
          concat message 
        end)
      end

      session.delete(:flash)
      nil
    end

    def state_color(state)
      case state
      when "pending", "draft"
        return "tag-yellow"
      when "progress"
        return "tag-azure"
      when "completed", "published"
        return "tag-green"
      end
    end