function $AdfMasonryLayoutBehavior$$($id$$220$$, $operation$$9$$, $index$$78$$, $sizeStyleClass$$4$$) {
  this.Init($id$$220$$, $operation$$9$$, $index$$78$$, $sizeStyleClass$$4$$);
}
$goog$exportSymbol$$("AdfMasonryLayoutBehavior", $AdfMasonryLayoutBehavior$$);
$AdfObject$$.$createSubclass$($AdfMasonryLayoutBehavior$$, $AdfClientBehavior$$);
$AdfMasonryLayoutBehavior$$.prototype.Init = function $$AdfMasonryLayoutBehavior$$$$Init$($id$$221$$, $operation$$10$$, $index$$79$$, $sizeStyleClass$$5$$) {
  $AdfMasonryLayoutBehavior$$.$superclass$.Init.call(this);
  this.$_id$ = $id$$221$$;
  this.$_operation$ = $operation$$10$$;
  this.$_index$ = $index$$79$$;
  this.$_sizeStyleClass$ = $sizeStyleClass$$5$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfMasonryLayoutBehavior.prototype.Init", {Init:$AdfMasonryLayoutBehavior$$.prototype.Init});
$AdfMasonryLayoutBehavior$$.prototype.$initialize$ = function $$AdfMasonryLayoutBehavior$$$$$initialize$$($behaviorComponent$$) {
  $AdfAssert$$.$assertPrototype$($behaviorComponent$$, $AdfUIComponent$$);
  $behaviorComponent$$ instanceof AdfUICommand && $behaviorComponent$$.addEventListener($AdfActionEvent$$.$ACTION_EVENT_TYPE$, this.$_actionHandler$, this);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfMasonryLayoutBehavior.prototype.initialize", {$initialize$:$AdfMasonryLayoutBehavior$$.prototype.$initialize$});
$AdfMasonryLayoutBehavior$$.$_getDomParentComponent$ = function $$AdfMasonryLayoutBehavior$$$$_getDomParentComponent$$($component$$260_parentComponent$$5$$) {
  for ($component$$260_parentComponent$$5$$ = $component$$260_parentComponent$$5$$.getParent();$component$$260_parentComponent$$5$$;) {
    var $parentElem$$ = $component$$260_parentComponent$$5$$.$getPeer$().$getDomElement$();
    if ($parentElem$$ && 1 == $parentElem$$.nodeType) {
      return $component$$260_parentComponent$$5$$;
    }
    $component$$260_parentComponent$$5$$ = $component$$260_parentComponent$$5$$.getParent();
  }
  return null;
};
$AdfMasonryLayoutBehavior$$.prototype.$_actionHandler$ = function $$AdfMasonryLayoutBehavior$$$$$_actionHandler$$($actionEvent_masonryLayoutComponent$$) {
  if ($actionEvent_masonryLayoutComponent$$.$isPartial$()) {
    var $behaviorComponent$$1_currComp_tileClientId$$2$$ = $actionEvent_masonryLayoutComponent$$.getSource(), $index$$80_tileComponent$$ = $actionEvent_masonryLayoutComponent$$ = null;
    if (null == this.$_id$) {
      for (var $assertMasonryLayoutMsg_prevComp$$ = null;null != $behaviorComponent$$1_currComp_tileClientId$$2$$;) {
        if ($behaviorComponent$$1_currComp_tileClientId$$2$$ instanceof AdfRichMasonryLayout) {
          $actionEvent_masonryLayoutComponent$$ = $behaviorComponent$$1_currComp_tileClientId$$2$$;
          $index$$80_tileComponent$$ = $assertMasonryLayoutMsg_prevComp$$;
          break;
        }
        $assertMasonryLayoutMsg_prevComp$$ = $behaviorComponent$$1_currComp_tileClientId$$2$$;
        $behaviorComponent$$1_currComp_tileClientId$$2$$ = $AdfMasonryLayoutBehavior$$.$_getDomParentComponent$($behaviorComponent$$1_currComp_tileClientId$$2$$);
      }
    } else {
      switch(this.$_operation$) {
        case "delete":
        ;
        case "resize":
          $index$$80_tileComponent$$ = $behaviorComponent$$1_currComp_tileClientId$$2$$.$findComponent$(this.$_id$);
          null != $index$$80_tileComponent$$ && ($actionEvent_masonryLayoutComponent$$ = $AdfMasonryLayoutBehavior$$.$_getDomParentComponent$($index$$80_tileComponent$$));
          break;
        default:
          $actionEvent_masonryLayoutComponent$$ = $behaviorComponent$$1_currComp_tileClientId$$2$$.$findComponent$(this.$_id$);
      }
    }
    $AdfAssert$$.assert(null != $actionEvent_masonryLayoutComponent$$, 'The masonryLayout associated with the MasonryLayoutBehavior for\x3d"' + this.$_id$ + '" could not be found (masonryLayout component \x3d ' + $actionEvent_masonryLayoutComponent$$ + ").");
    if (null != $actionEvent_masonryLayoutComponent$$) {
      $assertMasonryLayoutMsg_prevComp$$ = 'The masonryLayout associated with the MasonryLayoutBehavior for\x3d"' + this.$_id$ + '" is not a masonryLayout (masonryLayout component \x3d ' + $actionEvent_masonryLayoutComponent$$ + ").";
      $behaviorComponent$$1_currComp_tileClientId$$2$$ = null;
      if ("delete" == this.$_operation$ || "resize" == this.$_operation$) {
        $AdfAssert$$.assert(null != $index$$80_tileComponent$$, 'The tile associated with the MasonryLayoutBehavior for\x3d"' + this.$_id$ + '" could not be found (tile component \x3d ' + $index$$80_tileComponent$$ + ")."), $behaviorComponent$$1_currComp_tileClientId$$2$$ = $index$$80_tileComponent$$.$getClientId$(), $AdfAssert$$.$assertString$($behaviorComponent$$1_currComp_tileClientId$$2$$);
      }
      switch(this.$_operation$) {
        case "delete":
          $AdfAssert$$.assert(null != $actionEvent_masonryLayoutComponent$$.$deleteTile$, $assertMasonryLayoutMsg_prevComp$$);
          $actionEvent_masonryLayoutComponent$$.$deleteTile$($behaviorComponent$$1_currComp_tileClientId$$2$$);
          break;
        case "resize":
          $AdfAssert$$.$assertString$(this.$_sizeStyleClass$);
          $AdfAssert$$.assert(null != $actionEvent_masonryLayoutComponent$$.$resizeTile$, $assertMasonryLayoutMsg_prevComp$$);
          $actionEvent_masonryLayoutComponent$$.$resizeTile$($behaviorComponent$$1_currComp_tileClientId$$2$$, this.$_sizeStyleClass$);
          break;
        default:
          $index$$80_tileComponent$$ = parseInt(this.$_index$), isNaN($index$$80_tileComponent$$) && ($index$$80_tileComponent$$ = -1), $AdfAssert$$.$assertString$(this.$_sizeStyleClass$), $AdfAssert$$.assert(null != $actionEvent_masonryLayoutComponent$$.$insertTile$, $assertMasonryLayoutMsg_prevComp$$), $actionEvent_masonryLayoutComponent$$.$insertTile$(this.$_sizeStyleClass$, $index$$80_tileComponent$$);
      }
    }
  }
};
