package org.genericsystem.reactor.gscomponents;

import java.util.function.UnaryOperator;

import org.genericsystem.reactor.Tag;

import org.genericsystem.reactor.modelproperties.SelectionDefaults;

public class GSResponsive extends GSDiv implements SelectionDefaults {

	@SafeVarargs
	public GSResponsive(Tag parent, FlexDirection direction, UnaryOperator<Tag>... contentTagConsumers) {
		super(parent, direction);
		UnaryOperator<Tag>[] test = contentTagConsumers;
		new GSDiv(this, FlexDirection.ROW) {
			{
				addStyle("flex-wrap", "wrap");
				for (UnaryOperator<Tag> contentTagConsumer : test) {

					Tag tag = contentTagConsumer.apply(this);
					tag.addStyle("margin", "10px");
					tag.addStyle("padding", "10px");
					tag.addStyle("border-radius", "10px");
					tag.addStyle("background-color", "white");
					tag.addStyle("min-width", "10cm");
				}
			}
		};
	}
}

@@ -127,77 +127,8 @@
 g;%0A%0A
-import org.genericsystem.reactor.modelproperties.SelectionDefaults;%0A%0A
 publ
@@ -167,37 +167,8 @@
 Div 
-implements SelectionDefaults 
 %7B%0A%0A%09
@@ -302,89 +302,8 @@
 ent,
- direction);%0A%09%09UnaryOperator%3CTag%3E%5B%5D test = contentTagConsumers;%0A%09%09new GSDiv(this,
  Fle
@@ -321,18 +321,10 @@
 ROW)
- %7B%0A%09%09%09%7B%0A%09%09
+;%0A
 %09%09ad
@@ -354,18 +354,16 @@
 ap%22);%0A%09%09
-%09
-%09
 for (Una
@@ -403,19 +403,31 @@
 r : 
-test
+contentTagConsumers
 ) %7B%0A
-%0A%09%09
 %09%09%09T
@@ -466,26 +466,24 @@
 y(this);%0A%09%09%09
-%09
-%09
 tag.addStyle
@@ -494,34 +494,32 @@
 rgin%22, %2210px%22);%0A
-%09%09
 %09%09%09tag.addStyle(
@@ -533,34 +533,32 @@
 g%22, %2210px%22);%0A%09%09%09
-%09
-%09
 tag.addStyle(%22bo
@@ -576,26 +576,24 @@
 %22, %2210px%22);%0A
-%09%09
 %09%09%09tag.addSt
@@ -629,18 +629,16 @@
 e%22);%0A%09%09%09
-%09%09
 tag.addS
@@ -670,21 +670,9 @@
 ;%0A%09%09
-%09%09%7D%0A%09%09%09%7D%0A%09%09%7D;
+%7D
 %0A%09%7D%0A

Simplify GSResponsive component