/**
 * Wrapping stencil element into directive
 */
angular.module('cla.survey').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}" ng-model="picker.ngModel" 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}" ng-model="picker.ngModel" ng-checked="picker.ngChecked" disabled="disabled"></cla-picker>`,
        scope: {
            ngModel: '=',
            ngChecked: '=',
            ngDisabled: '='
        },
        controller: function () {},
        bindToController: true,
        controllerAs: 'picker'
    };
})
