<?php

namespace Hecate\Style\Parsers;

use Hecate\Lodash;

class Border extends BaseParser {


	public static $default = array(
		'width'  => '',
		'color'  => '',
		'radius' => '',
		'style'  => 'solid',
	);

	public static function parse( $data = array() ) {
		$data = Lodash::merge( static::$default, $data );

		$properties = array();
		foreach ( static::$default as $propertyKey => $defaultValue ) {
			if ( isset( $data[ $propertyKey ] ) && $data[ $propertyKey ] ) {
				$properties[ 'border-' . $propertyKey ] = $data[ $propertyKey ];
			}
		}

		return $properties;

	}
}
