<%
  const type = locals.type;
  const layoutProperties = locals.layoutProperties;
  const paintProperties = locals.paintProperties;
-%>
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.

#pragma once

#include <mbgl/style/types.hpp>
#include <mbgl/style/layout_property.hpp>
#include <mbgl/style/paint_property.hpp>

namespace mbgl {
namespace style {

<% for (const property of layoutProperties) { -%>
struct <%- camelize(property.name) %> : LayoutProperty<<%- propertyType(property) %>> {
    static constexpr const char * key = "<%- property.name %>";
    static <%- propertyType(property) %> defaultValue() { return <%- defaultValue(property) %>; }
};

<% } -%>
<% for (const property of paintProperties) { -%>
struct <%- camelize(property.name) %> : <%
if (/-pattern$/.test(property.name) || property.name === 'line-dasharray') {
%>CrossFaded<% } -%>PaintProperty<<%- propertyType(property) %>> {
    static <%- propertyType(property) %> defaultValue() { return <%- defaultValue(property) %>; }
};

<% } -%>
<% if (layoutProperties.length) { -%>
class <%- camelize(type) %>LayoutProperties : public LayoutProperties<
<% for (const property of layoutProperties.slice(0, -1)) { -%>
    <%- camelize(property.name) %>,
<% } -%>
    <%- camelize(layoutProperties.slice(-1)[0].name) %>
> {};

<% } -%>
class <%- camelize(type) %>PaintProperties : public PaintProperties<
<% for (const property of paintProperties.slice(0, -1)) { -%>
    <%- camelize(property.name) %>,
<% } -%>
    <%- camelize(paintProperties.slice(-1)[0].name) %>
> {};

} // namespace style
} // namespace mbgl
