/**
 * Wrapping stencil element into directive
 */
angular.module('cla.poll').directive('clangPicker', function() {
    return {
        template: (element, attr) => `<cla-picker ng-if="!picker.ngDisabled" displayinput="true" ${attr.block} size="${attr.size}" name="${attr.name}" id="${attr.id}" value="${attr.value}" ng-checked="picker.ngChecked"></cla-picker>
                                      <cla-picker ng-if="picker.ngDisabled" displayinput="true" ${attr.block} size="${attr.size}" name="${attr.name}" id="${attr.id}" value="${attr.value}" ng-checked="picker.ngChecked" disabled="disabled"></cla-picker>`,
        scope: {
            ngChecked: '=',
            ngDisabled: '='
        },
        controller: function () {},
        bindToController: true,
        controllerAs: 'picker'
    };
})
